The Actions Panel

 < Day Day Up > 



Everything that happens in Flash is the result of an event that causes a script to execute. There are three kinds of events: keyframes, mouse, and clip. These events also correlate to the areas you can place the scripts, which are keyframes, button instances, and clip instances.

Interactivity begins with an event being performed, such as a mouse click that results in something happening, a behavior or action. You can apply many actions in Flash, but for them to execute, you must tell them how to act. This telling is done by an event handler such as on (rollover) or on (release).

The Actions panel makes adding commands easy. You select the action you want or type your own code in (in Expert mode). The Actions panel is in your interface by default when you install Macromedia Studio. Click the expander arrow to open the panel. If you close and then open the Actions panel, choose Window ® Actions (F9). The name on the Actions panel varies depending on which event handle is selected. For instance if you have a frame selected, the panel would be called Frame Actions. If you select the object, the panel would be called Object Actions. In this book, it is referred to as the Actions panel.

Normal mode is the default. You'll see a list of actions grouped in categories or "books" in the left pane of the Actions panel. To switch to Expert mode, click the little blue arrow on the right side, and select Expert Mode or select Normal Mode or Expert Mode from the Actions Options pop-up menu. The keyboard shortcut is Ctlr+Shift+E (Command+Shift+E). In Expert mode, you can type or copy and paste custom code into the right pane of the Actions panel. You can also combine your custom code with the pre-built actions by double-clicking the action from the left pane or dragging the action into the right pane.

The Actions panel (Figure 28-1) in Flash MX has a new look and several new features. A brief outline of the various areas and functions follows.

click to expand
Figure 28-1: The Actions panel

  • ActionScript toolbox — An entire library of actions arranged in categories. Double-click an action or drag it to the Script pane to add it.

  • Script pane — The scripts you add from the ActionScript toolbox or type in Expert mode are displayed in the Script pane.

  • Parameters pane — In Normal mode only, you'll see optional parameters for selected actions when they are available. The triangle in the top-right corner expands or collapses the Parameters pane.

  • Add/Delete an Action statement — Select the action statement you want to work with and click the plus sign to add an action statement and the minus sign to delete an action statement.

  • Move Selected Action Statement — The up and down buttons are used to change the order of statements.

  • Insert Target Path — When referencing a button or Movie Clip instance, use this button to determine the relative or absolute path.

  • Jump menu — Because the Actions panel is context sensitive, the jump menu changes its information based on the selected element.

  • View Option menu — Toggles between Normal and Expert modes. You can also turn on line numbering from this menu.

  • Launch ActionScript Reference — Provides instant access to a built-in ActionScript reference library.

  • Script Pin button — You can choose to "pin" a script to the Script pane. It remains viewable at all times while you select other objects.

  • Normal mode — Generally new users who don't know a lot of ActionScript use this mode. Actions are created by choosing menu selections from the ActionScript toolbox.

  • Expert mode — You type your own ActionScript in Expert mode.

Tip 

You can switch back and forth between Normal and Expert modes as needed. But if there are errors in your syntax (code) then it can only be edited in Expert mode.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net