Followers

Tuesday, August 26, 2014

Flash: How To Animate on the timeline using Tweens

This is how to move something across your screen in Flash, such as clouds, or cars, or the sun or moon, to make your game a little more exciting.

1. Make a new layer. Call it Sky.
2. Draw a blue rectangle across the whole stage.
3. Make a new layer. Call it cloud, or sun, or moon, or whatever you are moving.
4. Draw your object that you will move.
5. Convert your object to a movie clip.
6. Move your object to the left of the stage. It will eventually move right. If you want it to move right to left, then move it over to the right of the stage.
7. On your timeline, click on a frame such as 40. It will turn blue. Right click on it and choose Insert Keyframe.
8. Choose the same keyframe, but on the sky's layer. Insert a keyframe there as well.
9. On the cloud's layer, on keyframe 40, move the cloud to the opposite side of the stage. This is where it will end up at the end of the loop.
10. Click in the middle of the timeline, anywhere, between the two starting and ending keyframes.
11. Right click there and choose Insert Classic Tween.

 That's all there is to it. Now your object will move across the sky.

If you want to slow down the movement across the screen, choose the  ending keyframes for all of your layers, (Shift+Select to select multiple items) and drag those keyframes to the left towards the higher numbers. We have found that around 1500 makes for a nice slow cloud movement.

This is a way you can have an animated intro to your games.

Mr. S.

No comments:

Post a Comment