How to Use Frame Labels in Flash CS5
Create Flash CS5 Animation with Poses
Create a Movie Clip Symbol in Flash CS5

Flash CS5 Code Snippets and Instance Names

The addition of the new Flash CS5 Code Snippets panel to Adobe Flash Creative Suite 5 brings ActionScript within reach for many more users and provides precreated code fragments for most every common need.

The Code Snippets panel is a helpful way to get up and running, but when you’re ready to venture out on your own, you’ll find that coding using the Actions Panel’s Code Editor window may give you more flexibility for certain tasks.

All ActionScript code is added to keyframes on the timeline, and here you’ll add some common ActionScript statements within the Code Editor and with the assistance of the Actions Panel’s Script Assist mode.

Every time you need to add ActionScript to control a button (or a movie clip), you first need to create an instance name for the button. An instance name is a unique ID that tells ActionScript which object on the stage to control or work with. The Code Snippets panel automatically assigns an instance name to a selected button or movie clip when you apply a snippet. You can also add your own instance name by selecting the symbol instance and entering an instance name in the Property inspector.

Instance names can be assigned to buttons, movie clips, and certain text fields. Each instance name needs to be unique, even across several instances of the same symbol.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Inverse Kinematics (IK) Poses and Animation in Flash CS5
Import Photoshop or Illustrator Files into Flash CS5 Catalyst
Flash CS5 Button States
How to Use Motion Presets in Flash CS5
Import Images for Flash CS5 Button States in Catalyst
Advertisement

Inside Dummies.com