It doesn't trace "plus 10" because you're calling it when you declare
all your variables, rather than 10 seconds later when seconds ==
newSeconds. You'll need an onEnterFrame or other loop running to
check, and one of the checks will have to be invoked during the
single second when it's 10 seconds after var seconds is declared.
Marc Hoffman
At 12:28 PM 3/23/2007, you wrote:
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