Just a quick tutorial to go along side my AS2 version of rotation.
Draw a box on the stage, Select it and press ‘F8′.
Name you’re movieclip and press ‘OK’.
![]() |
Now change the instance name to ‘myMovieClip’ and press enter.
![]() |
place this code in frame 1 of you’re actions panel:
function Main()
{
// Adding mouse event to our stage!
stage.addEventListener(Event.ENTER_FRAME, doTheTrace);
}
Main();
function doTheTrace(e:Event)
{
myMovieClip.rotation += 0.5;
}
Test you’re movie by pressing CTRL+RETURN.
If you’ve managed to follow my bad instructions then you should get a slowly rotating shape.
like this:
You're Thoughts & Discussion
No comments for “AS3 Basics: Rotate a movieclip with actionscript 3.0”
Post you're thoughts...