Re: [Flashcoders] another setInterval question

2007-03-27 Thread Kenneth Kawamoto
Pausing a timeout is not straightforward. But here's a quick solution: var intervalID:Number; var startTime:Number; var timeLapsed:Number; var func:Function; var ms:Number; function startTimer(func:Function, ms:Number):Void { this.func = func; this.ms = ms; startTime = new Date().valueOf

Re: [Flashcoders] another setInterval question

2007-03-26 Thread Muzak
ch 27, 2007 9:18 AM Subject: Re: [Flashcoders] another setInterval question > Hi, > note that the proposed solutions restart the interval, they do not pause it. > > Otherwise calculate how much time there is still left of the interval. > > greetz > JC >

Re: [Flashcoders] another setInterval question

2007-03-26 Thread Hans Wichman
Delegate.create(this, rolloverHandler); my_mc.onRollOut = Delegate.create(this, rolloutHandler); rolloverHandler(); regards, Muzak - Original Message - From: "Mauricio Furtado Massaia" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 27, 2007 12:46 AM Subject: Re: [Flashcoders] anoth

Re: [Flashcoders] another setInterval question

2007-03-26 Thread Muzak
OTECTED]> To: Sent: Tuesday, March 27, 2007 12:46 AM Subject: Re: [Flashcoders] another setInterval question >i think so , like this : > > var intervalID; > > function initInterva() > { >intervalID = setInterval( this , "nextScene" , 5000 ); >

Re: [Flashcoders] another setInterval question

2007-03-26 Thread Mauricio Furtado Massaia
i think so , like this : var intervalID; function initInterva() { intervalID = setInterval( this , "nextScene" , 5000 ); } function stopInterval() { clearInterval( intervalID ); } // onRollOver will stop the interval my_mc.onRollOver = function (){ stopInterval(); } // onRollOut res

Re: [Flashcoders] another setInterval question

2007-03-26 Thread Helmut Granda
yourbutton.onRollOver = function clearInterval(autoID); } yourbutton.onRollOut = function() { setInterval(autoPilot, 5000); } On 3/26/07, Raphael Villas <[EMAIL PROTECTED]> wrote: I have got a setInterval like this: - var autoID = setInterval(autoPilot,5000); function autoPilot

[Flashcoders] another setInterval question

2007-03-26 Thread Raphael Villas
I have got a setInterval like this: - var autoID = setInterval(autoPilot,5000); function autoPilot():Void { nextScene(); }; - If a rollover occurs, I'd like to pause the setInterval until the rollout occurs. Is there a way to suspend the setInterval during a