|
||||||
|
||||||
Flash Tutorial - Copy Motion as ActionScript 3.0

Free
Flash Tutorial
![]()
This is one of the most useful new features of Flash CS3. It enables you to convert a Motion Tween animation into ActionScript 3.0. This means that you can create a reusable script that can be applied to any object in Flash. It also means that you can open up existing Flash files and copy the animation into a new file and apply it to new objects in a few clicks.
You can capture the motion of the following properties of a Motion Tween animation:
Cross Ref: In you are not familiar with creating Motion Tweens see the tutorial: Motion Tween
Example: Download
the Flash file Int 102a
Copying a Motion Tween and creating an animation with ActionScript 3.0.
Click by Click: If you would like to view this tutorial without all the notes: Click by Click
Step One: Setting up the Flash Document
Note: By selecting ActionScript 3.0 your Movie will also be set to be published in Flash 9 Player. The feature that you are going to use is an ActionScript 3.0/Flash Player 9 feature. You can always change this setting later by going to File > Publish Settings > Flash > ActionScript Version.
Note: If you wish you can change the document's size and color:
Step Two: Create a Symbol to Animate
I am going to use some text as a the content for my symbol. In truth you could use anything such as a drawing, photo, clip art or any combination.
Step Three: Create a Motion Tween
You can create any Motion Tween that you like as long as it is in a single Layer. The Motion Tween can contain multiple Keyframes and span multiple tweens. It may also contain empty frames. The Motion Tween may also contain any of the following elements: Blend Mode, Cache As Bitmap Setting, Color, Custom Easing, Filters, Frame Labels, Motion Guides, Orientation To Path, Position, Rotation, Scale, Scale, Skew, Transformation Point.
I am going to make the text spin and blur. You can of course create any Motion Tween that you like.
First of all I am going to centre the Symbol on the Main Stage:
Symbol is centered on the Stage.
Frame 1 Motion Tween Properties.
The Motion Tween can now be seen in the Timeline.
Frame 25 Motion Tween Properties.
Your timeline should look similar to this:
Your Movie Should look similar to this:
Step Four: Create the ActionScript 3.0
Note: Although I have selected the entire Layer it is possible to select only a portion of a Layer if appropriate.
Note: Your ActionScript is now in the computers Clip Board memory. If you wished you could paste the ActionScript into a program like NotePad to store until you are ready to use at a later point.
Note: With Script Assist on you cannot type in the Actions Panel. If you want to learn more about Script Assist see the tutorial on the Actions Panel
Your Cursor will blink in the Actions Panel:
Your Actions Panel should fill with script:
Click here to see: ActionScript in Full
Your Movie Should look similar to this:
You may find that there are very minor discrepancies between the two animations but in general appearance they should be very similar.
Your Movie is now complete. If you wish you could now delete your original Motion Tween.
Have fun.
I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp!
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
8504 visitors to this page since
13 June 07 •
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|