The Actions Panel


First create a new movie with the File pull-down menu. Then choose Window, Development Panels, Actions to open the Actions panel. The panel is both collapsible and draggable. In the upper-right corner is an icon that opens a menu of panel options, as shown in Figure 2.1.

click to expand
Figure 2.1: The Actions panel has a large set of options to make your life as a programmer easier.

This icon exists on many of the panels. When the icon is clicked, it provides a list of options. The list is quite small for most panels, but for the Actions panel, there are many options. Click on the View Line Numbers option. It is extremely helpful when referring to specific parts of code, but even more useful is the fact that Flash will tell you the line numbers of any syntax errors it encounters when publishing the movie.

You should see two windows in the Actions panel. The window on the right is your script editor, and the window on the left is an ActionScript reference. You can click the small arrow button on the bar that separates the two windows . That will close the reference windows so you have the full panel's width available to script, as in Figure 2.2. When you need to refer to the documentation in the reference window, click the arrow again to open it.

click to expand
Figure 2.2: You can drag the reference window closed until you need it.

We're now ready to actually write some script. First, however, there is one small matter we need to discuss, and that's where to put our script.




Macromedia Flash MX 2004 Game Programming
Macromedia Flash MX 2004 Game Programming (Premier Press Game Development)
ISBN: 1592000363
EAN: 2147483647
Year: 2004
Pages: 161

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