Showing posts with label Rotate. Show all posts
Showing posts with label Rotate. Show all posts

Friday, February 29, 2008

Flash Quick Tip - Seamless Looping Tween

Have you ever wanted to make an object rotate continuously in Flash? It sounds simple enough:

1) Convert your object to a Symbol such as a Movie Clip
2) Create a second keyframe a ways out from your first one
3) Tween the two key frames
4) Set the rotation in the Frame Properties of the first keyframe to either Clockwise or Counterclockwise.


This does work and as long as the second keyframe is the last frame in the timeline, the animation will loop continuously when you play or preview your Flash movie. Of course there's one small problem: The animation pauses briefly every time it loops back to the beginning. This is because the first and last frames (the keyframes) are the exact same thing while the rest of the frames all show the object in a slightly different position.

To remedy this, all you have to do is add a couple extra step to the list above. After you've set the rotation (or any other property):

5) Right-Click on the frame just before the last keyframe and select "Insert Keyframe"
6) Right-Click the last keyframe and select "Clear Keyframe"

Now when you play or preview your Flash movie it will loop seamlessly. The one thing you need to keep in mind is that if you need to change the length of the tween (the amount of frames in between the keyframes) you will need to redo all the steps otherwise you'll again see a slight stutter.

Thursday, February 14, 2008

Flash Quick Tip - Scale and Rotate

Here's something simple that took me a while to discover about Flash. Normally when scaling and rotating objects I would use the Free Transform tool which works similar to similar tools in other graphics programs. To get more exact I also would use the Transform Panel. Flash actually offers a third way to transform object though and using it can really speed up development time. With any object selected press the <<Ctrl>> <<Alt>> and <<S>> keys at the same time and a little box titled "Scale and Rotate" will pop up. Enter whatever values you want and press the <<Enter>> key. The time saving trick will be evident when you use this command again as it will save your last values. This means that if you have 50 objects that all need to be rotated or scaled to the same dimension, you set values to the desired number for the first object then just keep clicking objects, pressing <<Ctrl>> <<Alt>> <<S>> and then <<Enter>> and you will be through all your objects in about a minute. To do the same thing with the Transform Panel would probably take twice as long and a lot more clicks and typing.