« Create action script for Flash car game | Main | How to make bouncing ball in Adobe Flash »

Smooth rotation spinning circle Flash animation

Tutorial for spinning or rotating a circle in Adobe Flash

This Adobe Flash tutorial demostrates how to make an animation that smoothly spins a circle. Firstly it shows you how to do it with a motion tween and one object. This works fine, however there is a short hickup or pause after each rotation. This is due to the animation being in a loop and starting again from the 20th frame back to the first.

To improve on this, the tutorial continues on and demonstrates the results of adding a second layer with a bit of action script (goto play 1) thrown in. This time when the Flash animation gets to frame 19, it reads the action script and goes back to frame 1 before it gets to the end of the movie. As you can see by the demonstration, it does look smoother than the first attempt. Although it still hops quickly back to the first frame. It just does it quicker so is harder to see.

Whats the answer? Well the answer is to add a few more lines of action script to the movie. Here is the action script as shown in the video tutorial:

onClipEvent (enterFrame)
{
i = getProperty(this, rotation);
setProperty(this, rotation, 1+18)

}


If your not familiar with how to add actionscript to your movie, Adobe has a good tutorial: Adobe Flash action script tutorial.

The software used in this tutorial to create a spinning circle is Adobe Flash.

To start the spinning circle animation tutorial click the go arrow:




subscribe to Website Design Tips feed Want to learn more about designing a website or improving an existing one? Subscribe to Website Design Tips today for free.

Comments (1)

Daniel B:

Thanks for the spinning Ying Yang tutorial. Seems so simple now but I hadn't noticed the rotation setting under 'motion tween'. Thanks for putting this online!!!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Add this blog to your feed Subscribe to this feed

About

This page contains a single entry from the blog posted on May 1, 2007 5:50 AM.

The previous post in this blog was Create action script for Flash car game.

The next post in this blog is How to make bouncing ball in Adobe Flash.

Many more can be found on the main index page or by looking through the archives.


copyright 2001-2007 © hypergurl.com