@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
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..
}
-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
: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
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
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
{
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 =
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);
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
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
]
[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
://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
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
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
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:
15 matches
Mail list logo