This content has been marked as final. Show 3 replies
try _root.onEnterFrame function. But, using this function is not fair...
But, if you want you can use this....
look into setInterval()... onEnterFrame will work but consumes much more
in the way of system resources
> I need infinite loop what runs all the time for checking my main timeline variables. How I can do it? It should work no matter what is current frame. Can I just use for loop?
> look into setInterval()... onEnterFrame will work but consumes much more
> in the way of system resources
What makes you say that? I've never heard anything about onEnterFrame using
more resources. If anything, it would use less as it does not involve a
timer etc, it gets handled as a part of the existing frame updating
onEnterFrame runs at exactly the right time so that it is called at the same
rate as the display is updated (regardless of what that may be).
With setInterval, it can very easily run too fast (if you set the interval
too short) and waste resources as a result, or it can easily run too slow
(if you set the interval too long) getting delays.
onEnterFrame is ideal for something where you want processing done at the
actual movie frame rate.