Hands-On: Flash MX 2004 ActionScript Parameters
ActionScripting is how Flash lets you add interactivity, start and stop actions,
perhaps drag actions and more to your movie. These actions can be written by
hand or selected from lists. We will cover the most basic actions here; however,
there are many books available for the more complicated scripting.
- The easiest way to add Actions is to first select one from the Global
Functions on the left.

- Either double-click the desired Action or drag itto the
right side of the Actions panel (the Script Area).
- Another easy way to add ActionScript to your movie is from the Plus Mark
+, just click the down arrow and choose from a cascading menu of selections.

- Each Action you add occupies one line on the right.
- Rarely is an Action just one word; more often an Action is complex enough
to require a whole sentence, or statement.
- A statement is a code sentence that uses only words from the ActionScript
language.
- The entire assembly of statements is a script.
- After you add anAction, there are a few ways to modify it.
- As you add Actions, each appears as a complete statement in the order
that you add them, and they'll occur in that order.
- You can change the order of any statement either by clicking its
line in the Script Area and dragging it to another position or by selecting
it in the Script Area and clicking the Up or Down arrow at the
top right.
- Modify an Action by specifying parameters from the Component
Inspector panel.
The Action
called gotoAndPlay makes the playback head jump to a different frame.
- You need to specify the frame to which you want to go. In this case, the frame
number is a parameter.
|