My version is the alternative way - not sure about the documentation on
it, although I am sure its in there somewhere. Found this:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=1662.html
SetInterval returns you a value- a number in fact that is the id of that
particular interval. Capturing that value and storing it makes sure you
have no problems clearing it. The reason you use the this keyword as in
this.intID is to ensure that the interval has access to the class
properties that it might need.
In the case of an fla where you are dumping code, this isn't the case and
you can use your form of the interval.
Thanks Stacey,
Yes it seems you need to pass in the parameter of 'this' before the
function name and time, although I couldn't find reference to this in
any of the manuals I looked in. Maybe they all just speak of AS1 and not
class use of setInterval.
_nInt = setInterval(this, myFunction, 100) --- works in the class
nInt = setInterval(myFunction, 100) --- is how the manual describes the
use of setInterval
Also, note the use of inverted commas around the function name in the
first example above, they aren't required in a straight up .fla
(non-class) like the second example above.
Thanks again,
Stephen.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com