I would suggest initializing the interval value as NULL instead of 0,
since I think 0 is a valid ID. That way you can be sure you don't
accidentally clear an interval that you don't want to.
-Andy
On 3/4/07, Alain Rousseau [EMAIL PROTECTED] wrote:
Well actually, clearInterval(0) clears the
or:
var num:Number = Number.NaN;
trace(isNaN(num));
regards,
Muzak
- Original Message -
From: Andy Herrman [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, March 06, 2007 6:37 PM
Subject: Re: [Flashcoders] clearInterval(0);
I would suggest initializing
Hello,
is it maybe safe to call clearInterval(0)
(same way as calling free(NULL) in C language)
or should I better not rely on this?
Here is my web chat function and I wonder
if I could get rid of the very first line in it:
var intervalID:Number = 0;
var resp_lv:LoadVars = new LoadVars();
var
Wow, lots of interval questions lately... :)
I don't believe clearInterval(0) does anything. However, the code you
posted looks correct.
-Adam
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
Well actually, clearInterval(0) clears the interval ID 0
lets say you have an interval defined :
var myInt:Number = setInterval(this, doSomething, 1000);
then it is possible that myInt = 0.
The value of myInt is set by calling setInterval, which returns the ID
of the interval,
so doing
5 matches
Mail list logo