PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Stephen Ford
Sent: Wednesday, November 29, 2006 7:35 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] How variables when using setInterval ...
Hello,
Lets say you have 10 different setIntervals running within your class.
Do
Hello,
Lets say you have 10 different setIntervals running within your class. Do you
also declare 10 different variables for these intervals ? like so:
private var nInt:Number;
private var nInt2:Number;
private var nInt3:Number;
etc
etc
Or can you just declare one variable and use it
Yep I think you'll need different variables.
On 11/30/06, Stephen Ford [EMAIL PROTECTED] wrote:
Hello,
Lets say you have 10 different setIntervals running within your class. Do you
also declare 10 different variables for these intervals ? like so:
private var nInt:Number;
private var
James O'Reilly has great Timer class to wrap/replace setInterval():
http://www.jamesor.com/2006/10/18/as2-timer-class/
-Scott
On 11/29/06, Stephen Ford [EMAIL PROTECTED] wrote:
Hello,
Lets say you have 10 different setIntervals running within your class. Do
you also declare 10 different
Kenny Bunch wrote an interval manager way back when.
http://www.kennybunch.com/index.php?p=16
To answer your question, though, setInterval returns a number, which is a
unique id reference for that interval. If you set another interval to the same
var, you orphan the previous interval
5 matches
Mail list logo