- What's New?
- Script Development
- Working with Content
- Miscellaneous Features
- Wrap-up
Script Development
Flash MX incrementally improves script development over its predecessor. The integrated development environment and updated ActionScript language are both solid, but whether or not you really need the upgrade is probably debatable.
Actions Panel / Reference
The new Actions panel, used for editing ActionScript code, is a big improvement. It includes a lot of pro-level IDE features like code hints, automatic formatting, inline breakpoint setting, as well as the existing color-coding system. Fonts and font sizes are now fully configurable.
Reference is a panel designed to save trips to the web browser for online help. If you want more information about a particular action, the Reference panel will display its entry from the ActionScript Dictionary. This is handy if you're unsure of what a piece of code does, or what syntax it requires.
Debugger
As any scripter knows, debugging often takes up more time than actually coding. Flash's debugging setup needed work, and Macromedia heeded the call. Unfortunately the Debugger panel still doesn't come up by default, so you'll have to fight the hardwired Ctrl+Enter habit when testing movies and reach for the Debug Movie command instead.
The Debugger itself is reorganized to include breakpoint support and a "Call stack" pane. The call stack makes it easier to determine what context a particular line of code is being executed in — crucial for complex scripts. Breakpoints can be set in the Actions panel, or from within the Debugger. The movie window is paused when it appears, and all scripted frames and objects can be accessed from the Debugger for breakpoint setting.
Better Buttons and Text Fields
Flash MX provides a few extra touches when it comes to text fields and buttons, most significantly the ability to assign them instance names. You're probably used to instance names for Movie Clips; they make the clips addressable for scripting purposes. The same now applies to buttons and text fields (input or dynamic).
New scriptable button properties include enabled, tabEnabled, tabIndex, trackAsMenu, and useHandCursor. The text field list is quite a bit longer, and includes a wide selection of functional and appearance-related properties. The TextField object also supports "listeners" so you can assign ActionScript functions to be notified of any changes made to the field.
ActionScript Objects
The latest iteration of the ActionScript language is a winner. Practically everything from Flash 5 has been rolled over without alteration, so your investment in learning it is protected. In fact, a lot of the newer actions are what I'd classify as luxury features, so you needn't worry about learning them until you have the spare time.
Highlights include a new System capabilities object that contains information about the playback computer (screen resolution, etc.), a rudimentary set of direct drawing commands, listeners, enhanced support for object-oriented scripting, plus a host of UI-related features like tab indexing and text field formatting.
Custom Actions
The documentation is sketchy, but the idea of Custom Actions is that you can create your own folder of actions and install it in the Actions panel to enhance your own copy of Flash MX. An "action" in this context is a combination of text that gets pasted into the script pane, plus a tooltip.
The program actually comes with a folder of custom actions built-in: Flash UI Components. If you want to learn the XML format required to create your own custom actions, check out the UIComponents.xml file. A copy of the file is located in the Flash MX, First Run, ActionsPanel, CustomActions folder on your hard disk.
The usefulness of this feature depends on how much you use certain pieces of script. After all, do you really want to write and install custom XML files just to accelerate code entry? A keyboard macro program like Keyboard Express or As-U-Type is probably going to be a faster solution in most cases.