Adobe Flash Professional CS6 Adobe Flash Professional CS6 Classroom In A Book | Page 226

naming rules Naming instances is a critical step in creating interactive Flash projects. The most common mistake made by novices is not to name, or to incorrectly name, a button instance. The instance names are important because ActionScript uses the names to refer- ence those objects. Instance names are not the same as the symbol names in the Library panel. The names in the Library panel are simply organizational reminders. Instance naming follows these simple rules: 1 Do not use spaces or special punctuation. Underscores are okay to use. 2 Do not begin a name with a number. 3 Be aware of uppercase and lowercase letters. Instance names are case-sensitive. 4 End your button name with _btn. Although it is not required, it helps identify those objects as buttons. 5 Do not use any word that is reserved for a Flash ActionScript command. Understanding actionScript 3.0 Adobe Flash Professional CS6 uses ActionScript 3.0, a robust scripting language, to extend the functionality of Flash. Although ActionScript 3.0 may seem intimidating to you if you’re new to scripting, you can get great results with some very simple scripts. As with any language, it’s best if you take the time to learn the syntax and some basic terminology. about actionScript ActionScript, which is similar to JavaScript, lets you add more interactivity to Flash animations. In this lesson, you’ll use ActionScript to attach behaviors to buttons. You’ll also learn how to use ActionScript for such simple tasks as stopping an animation. You don’t have to be a scripting expert to use ActionScript. In fact, for common tasks, you may be able to copy script that other Flash users have shared. And you can also use the Code Snippets panel, which provides an easy, visual way to add ActionScript to your project or share ActionScript code among developers. However, you’ll be able to accomplish much more in Flash—and feel more confi- dent using the application—if you understand how ActionScript works. This lesson isn’t designed to make you an ActionScript expert. Instead, it intro- duces common terms and syntax, walks you through a simple script, and provides an introduction to the ActionScript language. Adobe FLAsh ProFessIonAL Cs6 CLAssroom In A book 217