g Text Version
Beauty & Self
Books & Music
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
News & Politics
Religion & Spirituality
Travel & Culture
TV & Movies

Bored? Games!
Take a Quiz
Rate My Photo

Natural Living
Folklore and Mythology
Distance Learning

All times in EST

Full Schedule
g Flash and Animation Site

BellaOnline's Flash and Animation Editor


Code Snippets in Flash CS5

For those of us who don't like change, we will be happy to see that the workspace for Flash CS5 is basically unchanged from the CS4 version, with the exception of a few new and improved panels.

Flash CS5 has several new features for assisting with the ActionScript for your Flash movies. If you are a novice to ActionScript or a Flash developer who enjoys writing code, these new features will ease your daily workload and production time. The first one we will discuss is the new Code Snippets panel.

This great new feature for writing ActionScript is much like the Motion Presets feature. Code Snippets is a supply of prebuilt ActionScript code that you can add to your movie with just a click of your mouse. There are six categories of code snippets including Actions, Timeline Navigation, Animation, Load and Unload, Audio Video and Event Handlers.

For example, in the Actions category we have a drag and drop snippet. If we double click on this action, we get a message asking us to select the object on the stage to which we wish to apply the code. So, let's draw a rectangle on the stage and try again. This time, Flash tells us that we need to convert the rectangle to a movie clip and offers to do this for us. When we click OK, the Actions panel automatically pops open with the new code highlighted.

Before we check out the code snippet, let's verify that Flash really did convert our rectangle to a movie clip. In the Properties Inspector, we see that we have a movie clip named Symbol 1 and the rectangle on the stage has been given an Instance Name of movieClip_1. You will also notice that Flash has added a new Actions layer above the default Layer 1 in the Timeline. Frame 1 of the Actions layer now has the little "a" that indicates that there is ActionScript attached to this frame. Flash has done all of this for us.

Moving on to the Actions panel, we see the new code. At the top, we see a short description of what the code does. If the code had required us to make any customized changes, we would have been given instructions. But this is a simple example and there are none. If we test our movie, we will indeed be able to drag our rectangle around the stage.

*Adobe provided a review copy to me free of charge.

Join us in the Flash forum.

Add Code+Snippets+in+Flash+CS5 to Twitter Add Code+Snippets+in+Flash+CS5 to Facebook Add Code+Snippets+in+Flash+CS5 to MySpace Add Code+Snippets+in+Flash+CS5 to Digg Code+Snippets+in+Flash+CS5 Add Code+Snippets+in+Flash+CS5 to Yahoo My Web Add Code+Snippets+in+Flash+CS5 to Google Bookmarks Add Code+Snippets+in+Flash+CS5 to Stumbleupon Add Code+Snippets+in+Flash+CS5 to Reddit


RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map

For FREE email updates, subscribe to the Flash and Animation Newsletter

Past Issues

Printer Friendly
tell friend
Tell a Friend
Email Editor

Content copyright © 2018 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.


g features
Subtle Animation Website Trends

Wix Editor - Background Video

Video on Wix Websites

Archives | Site Map


Past Issues

Note: BellaOnline uses cookies to help provide a consistent user experience. Our advertisers may use cookies to help customize ads. Please contact us with any question about our cookie use.

Summertime Foods
Corn on the Cob
Burgers on the Grill
Apple Pie


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2018 Minerva WebWorks LLC. All rights reserved.

BellaOnline Editor