|
-
Senior Member
A nice trick to have one or more items on the screen moving very smoothly is by using the setInterval command, available in Flash MX and subsequent.
The setInterval function (see more details in the internal Flash help) allows you to call another function at a given time interval expressed in ms.
The great news is that by doing so you can have multiple objects moving on stage at different speeds, regardless the current fps of the SWF. In other words if you setup a setInterval every 10ms so that it calls a function that moves an object by 1 pixel at a time, you're running the animation of that object at 1000 / 10 = 100 fps, which should look very smooth.
I think this technique has a great potential to fine tune animations in Flash!
Lapo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|