This content has been marked as final. Show 7 replies
I never use frames.. I'd rather use seconds, I guess it's just personal preference..
"seconds (true) your tween relied on the users computer for the timing"
This doesn't sound valid to me, time doesn't change if a computer is slowing down, 1 second is 1 second anywhere you go. I would say it's the other way around, if the tween is based on frames, and the computer is having trouble with the animation, the fps will slow down, and therefore make the tween look choppy.
Actually, in the long run, using a time based approach vs frames will have little impact and is really a matter of personal choice.
Using seconds allows for correctly timed animations even in multiple FPS (say 12 vs 30) because 2 seconds is always 2 seconds where as if you need to use the movie or tween for for a different frame rate, you are often stuck having to mod code and re-export a file that you didn't want to adjust and now have to deal with other issues with other movies you may be working on.... In practice, usually you'll want to go with seconds because then Flash will deal with the math of getting it to the correct number of frames which supports the idea of re-usable code.
In terms of smooth vs choppy, I'd tell those people they need to look at their frame file sizes and try to pull that down first. Choppy animation is almost always caused when there are too many vectors on the screen for the processor to handle which in turn affects the frame rate which will affect your tween whether it is in seconds or frames anyways. This is what I've learned in my time with Flash anyway.
That does seem like it would make sense, the only thing i have to question is if you use seconds does your code use the computer for its timing? The reason I ask is because another developer came to me with some jumpy tweens an a pretty heavy site, so i said i would look at it and see if i could help, so i changed everything to frames (false) and adjusted to match his timing and everything is smooth now... just trying to find some logic behind this fix so we are not just banking on "luck"
To be perfectly honest, you probably saw a reduction because Flash didn't have to calculate how many frames were in x number of seconds if that makes sense. Math computations tend to kill the Flash Player or at least slow it to a crawl if there are enough of them.
Yeah that makes sense... thanks for everyones input
We have come to the conclusion that if you are going to have a lot of tweens happening at the same time that you should consider using frames. Since flash is based around frames it seems like the most logical thing to do is use frames instead of seconds to avoid calculating the difference. Plus i tend to use the timeline and keep things in a .as file so using frames helps me keep everything clean and precise.
So i guess at the end of the day it really does come down to personal preference and using whatever keeps your animations clean.
You're welcome :D