Hello :)

do you use the setInterval method ?

var cpt:Number = 0 ;

var action:Function = function ( msg )
{
      trace( msg ) ;
      if ( cpt ++ == 20 )
      {
              clearInterval(id) ;
              trace("stop the timer") ;
      }
}

var id = setInterval( action, 10000, "plus 10 seconds") ;

EKA+ :)

2007/3/23, Gustavo Duenas <[EMAIL PROTECTED]>:

Hi, I'm trying to launch an event using a timer so far the code for
trace something is this:

var now = new Date();

var seconds:Number = now.getSeconds();

trace(seconds);

var newSeconds: Number = seconds+10;

if ( seconds == newSeconds){
        trace("plus 10");
}

var seconds:Number = seconds;



the problem is that this ones doesn't trace" plus 10", instead just
traces the var seconds.

Do you know what is wrong here?


Regards.



Gustavo Duenas

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to