Now I'm having a problem... not sure if it has anything to do with the Timer or not.
Basically, I have an animation of an object moving across the screen from the left to the right. But rather than using a tween, I am using ActionScript to changing the x position every 2 frames. The reason for this is because the animation is supposed to loop, but it is supposed to speed up as time goes on, for about 30 seconds... and that would be very difficult to do on the timeline (if it's even possible).
So then I have a Timer set to a really high number (27900) and when it goes off it's supposed to stop the animation.
The problem is that for some reason, it doesn't always stop in the same position. It's close, but extremely noticable (like, maybe 20 or so pixels apart each time I run it).
I have no idea what's causing this... there is no random aspect to the code or anything... it adds the exact same amount to the x every time the movie is run. So I'm thinking either the 27900 milliseconds is not actually exactly 27.9 seconds each time, but is somehow changing by a fraction of a second each time the movie is run (causing the x to have a different amount added to it).
Does that sound reasonable... or could it be something else? I don't think it's a loading issue because I'm preloading all my symbols / movie clips ahead of time.
If the problem is the Timer and can't be avoided... does anyone know a work-around for this? Perhaps I could have a variable be incremented every frame and then stop the movie clip when the variable hits a certain number... would that work?
That, or I could try putting everything out on a 1000 or so frame timeline... but that's really a hassle (not to mention I don't really know how I could go about the speeding up thing)