This content has been marked as final. Show 4 replies
> Can someone please tell me how to do scripted animation
> that won't change if the frame rate slows down?
Rather than basing it on frame rate -- such as, say, a
MovieClip.onEnterFrame event handler -- you base it on millisconds.
> So If I'm trying to move a circle from x=0 to x=100 in 10
> seconds it always takes 10 seconds (not 12 on a slower
> machine) regardles of the framerate.
You *always* risk a variance in speed on slower machines. It depends as
much on *what* you're animating -- is it semi-transparent? does it have
thousands of vertces? -- as how you animate it. Rather than updating your
MovieClip instances' _x and _y properties on onEnterFrame, update them based
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
it makes sense but can't be done. animation is host machine dependent meaning there's no way to force a slow machine to play a complex animation quickly.
however, moving a circle from 0 to 100 is not complex and should not cause a problem in any maching made in this millenium. (if you're using flash 8 you can cache your circle movieclip's bitmap and make more efficient use of the flash 8 player.)
^__^ Thanks, guys. So there is no way to display an object (any object) independent of the frame rate and without using setInterval() only?
you could use the tween class. i'm not sure if (under the hood) it uses setInterval() and/or the frame rate, but the flash coding would not use either.