ok Ich habs:
Code:
if( document.all )
{
//alle deine glow-Objekte mit ID
glowobjs=new Array( "glowobj0", "glowobj1", "text" );
onload=function()
{
for( x in glowobjs )
{
glowobjs[ x ]=new glowobj( glowobjs[ x ] );
}
}
}
function glowobj( obj )
{
this.el=document.all[ obj ];
this.over=false;
this.x=0;
this.obj=obj + "Object";
eval( this.obj + "=this" );
}
glowobj.prototype.glowup=function()
{
this.el.filters[ 0 ].strength=this.x;
this.x++;
if( this.x <= 6 && this.over )
this.timer=setTimeout( this.obj + ".glowup()", 50 );
else
this.timer=setTimeout( this.obj + ".glowdn()", 50 );
}
glowobj.prototype.glowdn=function( out )
{
this.el.filters[ 0 ].strength=this.x;
this.x--;
if( this.x >= 0 && this.over )
this.timer=setTimeout( this.obj + ".glowdn()", 50 );
else if( out )
this.over=false;
}
glowobj.prototype.glowstop=function()
{
clearTimeout( this.timer );
this.glowdn( true );
}
function startglow( nr )
{
if( document.all )
{
glowobjs[ nr ].over=true;
glowobjs[ nr ].glowup();
}
}
function stopglow( nr )
{
if( document.all )
{
glowobjs[ nr ].glowstop();
}
}