SUPER FAST Flash
SUPER FAST Flash
Out of context: Reply #9
- Started
- Last post
- 10 Responses
- lostnation0
var i=0;
doIt = setInterval(function () {
i++;
i>50 ? clearInterval(doIt) : null;
updateAfterEvent();
}, 10);make sure the variable handler for your setInterval call is not temporary, i.e. defined with the 'var' keyword, otherwise you will never be able to clear it, and your performance will go to hell.
also, note that setInterval is global. you should be able to clear it from any timeline, and so you don't need to declare it with the 'this' keyword, i.e. this.doIt=setInteval.
make sense?