Gustavo,
stop();
var later:Number = (getTimer()/1000) + 20;
this.onEnterFrame = function (){
var now:Number = getTimer()/1000;
if(now >= later){
trace("llegamos");
delete this.onEnterFrame;
}
}
trace(later);
HTH
-Keith
http://keithreinfeld.home.comcast.net
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Friday, March 23, 2007 6:58 PM
To: [email protected]
Subject: [Flashcoders] setting a timer in flash 8
Hi, I'm trying to set a timer to trigger a event after 20 seconds or
less, but so far i have this code, but with no results
someone help me? .
I don't know how could I got into but some help might be needed
this is the code: is inside the first frame of a movie clip and the 4
frame has: gotoAndPlay(1);
var now = getTimer();
var seconds:Number = now/1000;
var later:Number = seconds+20;
this.onEnterFrame= function (){
if(seconds == later){
trace("llegamos");
}
}
trace(seconds);
Regards
Gustavo Duenas
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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