Macromedia Studio MX Bible

 < 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.

Figure 28-1: The Actions panel

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 > 

Категории