ActionScript Basics / Copying & Converting Animations Using ActionScript
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
One of my favorite new features in Flash CS3 is the ability to copy motion and paste it to other objects. You can now copy and paste motion to let you copy a motion tween and paste or apply the tween to frames, tweens, symbol information, and all the rest of it to another object. When pasting the motion tween to another object you can also choose to paste all the properties associated with the motion or choose specific properties to apply to the other object. Let me demonstrate this with an example. I have here in this open file a simply animation of a rectangle spinning and changing size. I can select this entire layer here and copy that animation by choosing edit, timeline, copy, motion. Now I can only copy the motion within one layer, I can't copy motions that transcend multiple layers. So I'm gonna create another layer into the blank key frame there I'm gonna drop another symbol of the rectangle. Notice that the second rectangle is larger then the first one. Then I'll select that rectangle there, the new one and choose from main menu, edit, timeline, paste motion. Notice that the size immediately changes and the animation is duplicated in the new object. Now I can also do this with other symbols in the library, it doesn't have to be the same symbol but it does have to be a symbol, it can't animate a graphic so let's drop symbol number two, copy certain attributes of the motion tween. You can choose edit, timeline, paste motion special. That'll bring up the paste motion special dialog, where you can pick and choose any of these options to copy over. Position, scale, rotation and skew, color filters and blend mode. You can also instantly convert timeline animations into ActionScript 3.0 these animations then can be added and edited and leveraged into other Flash projects and Flash files. Let's go ahead and copy my original animation here. I'm going to select that layer, and then from the main menu choose edit, timeline, copy motion as ActionScript 3.0, Flash will copy all of that motion. Converts it into ActionScript 3.0, it asks for an instance name to use in this script. I'll enter star. The action script will call on this instance name in another document and apply all that animation to it. click OK, now I got another document already with a symbol on the stage, let's open up the properties inspector. And we need to make sure that instances name is spelled exactly the same as my prompt in the other documents so there it is. So the ActionScript is now on the clipboard, let's go ahead and add a new layer, call it actions. Enter the key frame there, I'm going to select it so I can paste all of the ActionScript that I saved previously into that key frame. So open up the actions window and let's paste the actions into the window. There's all the actions that define that animation for our star instance and now let's preview this in the browser. I noticed the animation is identical to the original animation. The object is different, but its spinning, and changing scale. And that will conclude this section of the tutorial on the basics of ActionScript; you've gotten a definition of ActionScript as well as a review of the actions panel. You've learned about the differences between ActionScript 3.0 and the older versions of ActionScript 1.0 and 2.0, you've learned how to use ActionScript to control the timeline as well as the various events that trigger your scripts and In this movie, you learned how to copy animations from one symbol to another and also how to convert animations to ActionScript 3.0.
Tutorial Information
| Course: | Adobe Flash CS3 |
| Author: | James Gonzalez |
| SKU: | 33793 |
| ISBN: | 1-934743-05-4 |
| Release Date: | 2007-10-12 |
| Duration: | 11 hrs / 125 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 