Hi Gustave, Here is the answer to your query. The best way for any timing related task is to use Interval. Here is the syntax: var <variable name>:Number = setInterval(<function name to call>, <time interval in millisecond>); function <function name to call>(){ //do your task here.. } //////////////////////////////////////////// The following is the example for your inderstanding & testing. this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100, 22); date_txt.autoSize = true; date_txt.selectable = true; var date_interval:Number = setInterval(updateTime, 500, date_txt); function updateTime(my_txt:TextField) { my_txt.text = new Date().toString(); trace(my_txt.text); } I hope, this is well enough to solve your problem. Thanks & regards, Parvaiz Patel. > Gustavo Duenas wrote: >> 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 >> >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ 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