Developers
Without a doubt, the lion's share of new toys in Flash MX are designed for the Flash Developer. You have probably heard the new Macromedia mantra, "build entire websites with Flash MX." I am going to extend this mantra: "build Next Generation applications with Flash."
The promise of Java was the ability to run a Java written application on any Operating System: 100% Java. But it did not work out that way. Through moves by Microsoft and a foggy roll-out plan by Sun, Java has almost completely moved away from the browser. Flash, on the other, is installed on over 98% of all computers. A formidable distribution platform that can be leveraged to build applications for.
So what makes Flash so ready for application development? In short, it is the massive support for new and enhanced Object Oriented development. In my new book, Flash MX Magic, Andreas Heim wrote an entire Yatzee-style game to demonstrate how Object Oriented methodology is applied to Flash. Indeed, the new enhancements to the scripting environment make once impossible or difficult processes a snap.
An immediate enhancement you see is that all objects on the stage can be controlled in the same way as if they are movies. This means that a text box does not need to have a Variable, only a name. You can then call that name in the same way you navigate to a movie. For instance, in the following figure you see an empty text box. In the Properties Panel I have given the Text Box the name "test."
Figure 7: The text box is programmatically associated through a name and not a variable
In frame 1 of the Action Panel I added the following script:
test.text = "This is some dynamic text.";
The name of the text and how the text is then presented in the final movie is the same as a movie clip name. And, as you can see, we also have some new text methods. Lots of good stuff.
An element that was introduced in Flash 5, but did not really take off, was SmartClips. A SmartClip is a reusable movie that can be customized through exposed parameters. Well, SmartClips have radically grown up and are now called Components.
With Flash MX you get a collection of Form Components. This small collection allows you to easily add form elements, such as radio boxes, check boxes and drop down lists to a movie. As with Visual Basic, once you have the element on the page you can modify the parameters of that element. With a check box, for instance, you can control what the check box is for. Each of the default elements can also be controlled programmatically with ActionScript. A great tutorial on how to do this can be found at www.flashcomponents.net.
What makes components so engaging is that they are not too complex to build. Once built, you can share them. Macromedia has added new sets of components: Charting components and Flash UI Components Set 2.
The sheer amount of new methods that can be controlled with Flash ActionScript is massive — almost overwhelming (but not quite). There will surely be dozens of books hitting the market designed to exploit all of the new features. With that said, I am going to give you a quick run down of what's hot and what's changed in Flash MX Scripting:
SetInterval and ClearInterval |
These new commands can be used to set up generic routines that can be called during the lifetime of the movie. |
Switch Method |
In compliance with ECMA-262, Flash MX introduces the Switch method to help IF, Else, and Then statements be written more effectively. |
Shape Drawing API |
Shapes can now be programmatically drawn with ActionScript. This gives you the freedom to dynamically create movies, name the movies, and interact with the new movies without adding a single drawn image. |
Code Hinting |
At last, you do not need to remember exactly how to write all of that complex ActionScript. The editor now has code hinting. |
Actionscript Reference Panel |
With the ability to create your own methods, it is now essential that a reference is easily accessible. The Reference Panel is that new tool. |
Code Debugger |
The debugging tools are much stronger. Need a breakpoint in your code? You've come to the right place. |
This is not an exhaustive list. You will find a comprehensive ActionScript reference with the software.
So with all of these new features, are people going to really build web sites with Flash? The initial consensus is looking that way. An example of a site that leverages Flash to dynamically manage the content of the site is Innovativa.com (see Figure 8).
Figure 8: Innovativa.com is built entirely with Flash. One master movie is dynamically populated with content from separate SWF files and external data. All of the textual content can be managed and edited without ever having to open a single FLA file.
Additional sites demonstrating the power of Flash MX are ihotelier.com and 2advacned.com web site.