Re: [Flashcoders] setting a timer in flash 8

2007-03-27 Thread Omar Fouad
@chattyfig.figleaf.com Subject: RE: [Flashcoders] setting a timer in flash 8 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

RE: [Flashcoders] setting a timer in flash 8

2007-03-26 Thread Parvaiz Patel
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.. }

RE: [Flashcoders] setting a timer in flash 8

2007-03-26 Thread Joe Wheeler
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Parvaiz Patel Sent: 26 March 2007 13:51 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] setting a timer in flash 8 Hi Gustave, Here is the answer to your query. The best way for any timing

Re: [Flashcoders] setting a timer in flash 8

2007-03-26 Thread Gustavo Duenas
:51 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] setting a timer in flash 8 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

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Shahid Kanwal
hi, i think this might help with the flash timer stop(); pausedAt = getTimer(); this.createEmptyMovieClip(frameLoop, 1); frameLoop.onEnterFrame = function() { if ((getTimer()-pausedAt)/500=6) { play(); this.removeMovieClip(); } // end if }; I have used this many

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Pedro Taranto
var intervalID:Number = setInterval(timer, 1000, this); var timeLimit:Number = 20; var timeCounter:number = 0; function timer( mc:MovieClip ) { if( mc.timeCounter == mc.timeLimit ) { mc.timeLimit = 0; clearInterval(mc.IntervalID); trace(time LIMIT); } else {

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Hans Wichman
Hi, you asked this question before, and I replied to it, why not continue that thread instead of reposting it? You are on the right track though, there are different approaches: 1. waiting a number of frames: var curFrame:Number = 0; var frameRate:Number = 12; var waitFrames:Number =

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Alain Rousseau
I made a Timer class that I use for another set of Classes I wrote. Here is the class itself, it's pretty precise and reliable so far. Hope it Helps ! usage : import ca.daroost.utils.Timer; soundTimer = new Timer(); soundTimer.addEventListener(onTimerDone, this);

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Yehia Shouman
try using undocumented setTimeOut or setInterval instead say you have a function foo with setInterval: var secondsToWait:Number= 20*1000 //20 seconds var interval_ID:Number=setInterval(this,foo,2) function foo() { clearInterval(interval_ID); trace(llegamos con setInterval); } with

RE: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Glenn Grant
elapsedTime:Number = currentTime - startTime; if(elapsedTime = later){ trace(llegamos); clearInterval(timeCheck); } } Message: 22 Date: Fri, 23 Mar 2007 19:57:54 -0400 From: Gustavo Duenas [EMAIL PROTECTED] Subject: [Flashcoders] setting a timer in flash 8

RE: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Jesse Graupmann
] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, March 23, 2007 4:58 PM To: Flashcoders@chattyfig.figleaf.com 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

RE: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Keith Reinfeld
://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: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] setting a timer in flash 8 Hi, I'm trying to set a timer

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Helmut Granda
Gustavo, Duenas noches :) Search for setInterval in the help manual ;). ...helmut On 3/23/07, Gustavo Duenas [EMAIL PROTECTED] 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

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Alain Rousseau
Btw when setting a start time other than 0 to the timer, it's the difference between both that will be calculated. Example : you app starts at 0ms, but for some reason you need some data loaded that your timer needs before it starts. You need to take into account the time elapsed. var

[Flashcoders] setting a timer in flash 8

2007-03-24 Thread Gustavo Duenas
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: