Rotation in Flash

Rotation in Flash
This tutorial aims to teach you one of the basic underpinnings of Flash rotation in both ActionScript and tweened Flash.

Rotation

This tutorial is the underpinning of many websites and can help you in game design and also many websites use rotation alongside zooming effects. The bottom line is that even though this is simple enough to do it is still very important

Step1:
Create a New flash Document in the standard document dimensions 550px width and 400px height.

Step2:
Use the Text Tool to create a Static Text Box with the text saying something like “Rotation” or “Im Spinnin”.

Step3:
Right Click the text box and select convert to symbol from the context menu.

Step4:
Click on frame 35 and press the F6 key which is used to create a new keyframe.

Step5:
Now click on the Align & Info & Transform panel and select the rotation box which should read 0˚ and change it to read 350˚.

Step6:
Click on frame 1 and select Insert->Create Motion Tween

Step7:
Now click on frame 18 and press F6 once again so as to create a new keyframe.

Step8:
Now once again click the Align & Info & Transform panel and click on the field entitled rotation and change it’s value to 180˚.

Step9:
Now you have an application that works you can press the Enter key to view the movie this is the end of the rotation tutorial and you can play around applying your newly learned rotation techniques to shapes, bitmaps and movie clips for some really interesting effects.

Alternative Step1:
Create a New flash Document in the standard document dimensions 550px width and 400px height.

Alternative Step2:
Use the Text Tool to create a Static Text Box with the text saying something like “Rotation” or “Im Spinnin”.

Alternative Step3:
Right Click the text box and select convert to symbol from the context menu and choose MovieClip.

Alternative Step4:
In the properties panel assign the MovieClip the name “spin”.

Alternative Step5:
Activate the actions panel (F9).

Alternative Step6:
paste in the below code

onClipEvent(enterFrame){
this._rotation += 10;
}

Alternative Step7:
Now you have an application that works you can press the Enter key to view the movie this is the end of the rotation tutorial and you can play around applying your newly learned rotation techniques to shapes, bitmaps and movie clips for some really interesting effects. Oh yes and if you want it to rotate like it did in the original motion tween try editing the movieclip so that the text is aligned to the horizontal and vertical center whilst being snapped to the stage.

Have Fun 😉

Nathan Pakovskie is an esteemed senior developer and educator in the tech community, best known for his contributions to Geekpedia.com. With a passion for coding and a knack for simplifying complex tech concepts, Nathan has authored several popular tutorials on C# programming, ranging from basic operations to advanced coding techniques. His articles, often characterized by clarity and precision, serve as invaluable resources for both novice and experienced programmers. Beyond his technical expertise, Nathan is an advocate for continuous learning and enjoys exploring emerging technologies in AI and software development. When he’s not coding or writing, Nathan engages in mentoring upcoming developers, emphasizing the importance of both technical skills and creative problem-solving in the ever-evolving world of technology. Specialties: C# Programming, Technical Writing, Software Development, AI Technologies, Educational Outreach

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top