Developer

Flash MX: From fluff to serious application builder?

The latest version of Macromedia Flash is being touted as a lightweight, portable application development tool. Does it have what it takes to wear that label?


Over the past few years, Macromedia has established a reputation for creating first-class tools for Web designers with its Dreamweaver, Shockwave, Fireworks, and Flash products. In particular, the company's Flash "rich content" animation tool, with an estimated 414 million users of its player client, is the most widely used rich Web content medium today. Macromedia's new Flash MX attempts to move Flash's status beyond that of animated frosting on the average Web site, into the realm of application development tool.

 

Macromedia Flash MX
Pricing:
$499 for new users
$199 upgrade from Flash 5

Supported platforms: Mac, Mac OS X, Windows

Available March 15
Trial download available from Macromedia



Designer's heaven
One characteristic trait of all Macromedia's applications is that they are helpful enough to make it easy to get into when you're starting out, while intelligent enough to stay out of your way later on. Even knowing this, as a first-time Flash user, I was pleasantly surprised by just how easy it was to dive right in and build a fairly complex movie with Flash MX.

The product includes the wonderful context-sensitive property inspector found in other Macromedia apps, although it doesn't quite work with everything. Animation frames, for example, still have separate property windows. Building simple automation into an animation is possible using a wizard-like action editor, which lets you pick objects and other code elements using a menu-driven interface.

MX is an improvement over its predecessor in several key areas. A designer now has much more control over the placement of images on the movie stage, right down to the pixel level, and there's good support for custom colors. This new version also adds improved support for importing video from a variety of formats.

Enough already; it's more than just flashy animation
Okay, so the graphics design features are great, but I'm sure you're not here to read about them. So what about the promised application building tools? The most obvious improvement in this arena is MX's new, standardized GUI widgets. The usual suspects are all supplied: push and radio buttons, combo boxes, list boxes, scroll bars, and check boxes, all with the standard sets of properties you'd expect. Figure A shows the Flash UI Components toolbox.

Figure A
Flash MX's standard GUI component library


There's support for creating custom "packaged" components as well. The standard components are meant to replace the hodge-podge of graphics elements that served as GUI controls in past versions of Flash and led to wide criticism that Flash GUIs were at best very bad and at worst unusable.

A typical Flash MX application is built using the same editor interface as that used for authoring a movie. In fact, there isn't really any conceptual difference between a movie and an application in Flash MX. To create an application, you simply place a few GUI controls on an animation's layers and write some ActionScript code to handle events raised by a user's interaction with the controls. The Flash player then interprets the script code when the movie is played back. You can see an example of this in action at the Broadmoor Hotel reservations site, which was written using a prerelease version of Flash MX.

The Flash MX architecture gives applications several advantages over a traditional Web-form-driven application. A Flash MX application functions much more like a desktop application: It's immediately responsive, data validation can be done inline, and no page refreshes are necessary to display new content. Those advantages equate to a far more streamlined experience for the user.

The aforementioned ActionScript provides the logic for Flash MX applications. ActionScript is essentially JavaScript with a large, built-in library of objects for controlling Flash movies, parsing XML, communicating with servers through a socket interface, and more. ActionScript code is written using the built-in Actions editor, either through the menu-driven Normal mode or the Expert mode, which provides a fully functional code editor, complete with color syntax highlighting, auto-indenting, an integrated debugger, and pop-up code hinting.

Flies in the ointment
Notably absent from the list of standard GUI components are text controls like labels and edit controls. That's because Flash MX uses a drawing element to display text. Although there is an analogous TextField ActionScript object, there is no such thing as an edit control or text box in Flash MX. Not that this is even remotely a serious problem, but it does point up a general shortcoming of the Flash MX editing environment from an application development point of view.

Traditionally, developers build GUI applications by tying together multiple discrete objects using code. In Flash MX, developers build an application by tying together animation frames in a movie with code, as shown in Figure B. Further, ActionScript code can't really be directly attached to an object; instead, it lives in layers of the actual Flash movie. The movie-as-application metaphor pervades the Flash MX environment and feels at times rather like someone tried to shoehorn a development environment into Microsoft Paint.

Figure B
The editor is great, but the "app-as-movie" metaphor isn't always appropriate.


While the Broadmoor Hotel reservation application appears to work very well, the sample movie/applications that came with my copy of Flash MX are rather uneven. Occasionally, keystrokes and mouse clicks must be repeated before they register and are sometimes lost altogether.

MX = Macromedia .NET? Not quite yet
The MX moniker is being given to what Macromedia hopes will become its .NET: a new generation of application development tools that will change the way developers build applications. The newest version of Flash is capable of building rich application front ends that are just as accessible and ubiquitous as Java, obviously more cross-platform than .NET, and more bandwidth-efficient than HTML or DHTML. But will this newest Flash lure application developers to Macromedia's camp?

My opinion is, not quite yet. Flash MX is quite good and a big step in the right direction, but it's simply not mature enough at this point. Until the rest of Macromedia's MX line is released, with its promised server-side support for .NET, J2EE, and ColdFusion, Flash MX is simply a very good scriptable graphics tool.

Editor's Picks