Flash is known for being an interactive animation program, but unlike animation, adding interactivity means making things happen within a movie, like creating links so that your viewers can explore your movie, controlling audio or video, or having a certain event trigger when your movie reaches a certain point.
Flash handles this interactivity with something called ActionScript. ActionScript is Flash's native scripting language, which allows developers to create highly interactive movies. Flash gives us multiple ways to work with ActionScript, from a simple point-and-click interface (for us visual designer types) to full on scripting mode (for programmer folks). So in other words, Flash will let you work with ActionScript in a way that works for you.
In this short tutorial, we'll take a look at a few basic efficiency techniques when working with ActionScript. Before we go any further though, make sure you've created a symbol and dropped an instance of the symbol onto the Stage. Also, make sure you've given the symbol instance a name at the top of the Properties panel.
Also, it's considered best practices for Flash developers to create a separate layer in the Timeline for their ActionScript -- in other words, keeping the ActionScript isolated from all the other content in their movie. So, go ahead and create a new layer and name it Actions.
You certainly don't have to hand-code your ActionScript. The Code Snippets panel provides pre-created bits of ActionScript that are ready to be applied to your movies. Pop open the panel by choosing Window > Code Snippets.
Once you have some ActionScript happening inside the Actions panel, you can adjust various components of your code by making use of Script Assist. In the top-right of the Actions panel, click the Script Assist button (the magic wand icon). Next, click within your ActionScript code in the main area of the Actions panel. Notice how the top portion of the panel displays various components of your code? You can adjust settings and parameters via the fields at the top of the panel. Nice, huh?
Across the top of the Actions panel, you'll find a row of very handy icons and commands, starting off with the Add Actions menu. Use the menu whenever you'd like to add items to your script. In fact, you can either use the menu at the top or you can always use the column of ActionScript elements on the left side of the Actions panel, too. This area is called the Actions Toolbox. Either way, you can easily add onto your script in a fast and easy way -- sure beats hand coding!
Want to learn more? Check out this video tutorial below: