This site is now just an archive over the rise and fall of Flash. The domain flashmagazine.com is available for sale
Login | Register
New for Coders in 2004

August 26th 2003 | Jens C Brynildsen

0 comments

 

New for Coders in 2004

ActionScript really took a big step towards a professional language with Flash MX. With MX 2004, Macromedia sort of splits the language into two; ActionScript and ActionScript2. The new forms-based layout tool should also attract a lot of new developers.

Project management
MX Professional now has source code integration with Microsoft SourceSafe and an new view that will allow you to put all your source files into a project file, so that you have all of your application assets in one place. Theres also team management possibilities and checking in and out files of a project and manage it all through source control.

ContextMenu
We have wished for this one for ages. Now you can turn on and off menu items at will from the rightclick-menu (CTRL+click on Macs). You can add your own commands, separators and there's even a save-command (we couldn't get it to work in our Beta version though). Now you can finally add that "Open in new window" or "About this site" command.

PrintJob
This class will let you render dynamic content at runtime, prompt users with a single print dialog box, and print an unscaled document with proportions that map to the proportions of the content. You can also adjust things such as page height, width, and orientation, and you can configure your document to dynamically format Flash content that is appropriate for the printer settings. Combined with FlashPaper, this will open up a new era of Flash printing.

MovieClipLoader
Loading of external movies have long caused problems and Macromedia have adressed this through the new MovieClipLoader-class. A host of new commands will make this job easier and on a sidenote: the bandwidth profiler now will show the streaming of external assets at the correct speed. You can truly simultate a download with it!

There's several new commands for ActionScript and one to notice when loading is _lockRoot. This command specifies what _root refers to when a SWF file is loaded into a movie clip. A great timesaver when you need to display code containing absolute references.

Error handling
There's a new error class in MX 2004. Using commands such as 'try..catch..finally' you can now control what to do if routines fail and the player throws an error.

Headers
When requesting external files, you may now specify headers to send to the server. This is required as part of the new SOAP support.

ActionScript2
This is of course the really big thing in MX 2004. 'Flash MX 2004 and Flash MX Professional 2004 introduce several new language elements that implement object-oriented programming in a more standard way than before. Because these language elements represent a significant enhancement to the core ActionScript language, they represent a new version of ActionScript itself: ActionScript 2' (from the documentation).These new elements should give you a good idea of what this is: class, extends, implements, interface, dynamic, static, public, private, get, set and import.

We've not yet had the time to ponder about all the possibilities this will open up, other than that ActionScript2 is now leaving the scripting scene to become a proper language. ActionScript 2 is a strict language, something that Macromedia tried to introduce in Flash MX, but due to some problems with #strict, this was skipped for the previous release. Main thing to notice about strict: case now matters greatly when coding! AS2 is ECMA-262 Edition 4 compliant and supports inheritance, strong typing, casting objects and the event model.

Soap support and direct inspection of services
MX Professional 2004 is able to connect and inspect services directly inside the IDE. That'll save you hours, but MX Professional also comes with several data connection components. All data integration is implemented using visual components that can be dragged onto the application form.

We did an application to look up road conditions in California in less than 5 minutes, and we did not even look at the help files before trying! It's really that easy! Using these components, connecting to SOAP applications is now just a matter of dropping components on stage, connecting to a service and then set up the data binding.

For those preferring to work only in code, all objects can be instantiated and controlled through ActionScript as well. The scriptable data-binding supports Simple Object Access Protocol (SOAP), web services, XML, relational databases, and Macromedia Flash Remoting.

Help system reworked
The help system is brand new. Now you can search without waiting for the Java-applet or Internet Explorer to initialize. This should major improvement since relying on IE is not too wise. It sort of tends to ... hang from time to time. How good the new system is remains to be seen, as the help files are not fully completed. In all kinds of software development, help files are usually created towards the end of the development cycle. The neatest thing is that the help-system now has an auto-update feature that should keep things current.

From the docs we've seen, they seem more extensive than the current ones. More and better examples seems to be the trend and that is certainly needed! If you have not seen it already, check out this effort by ActionScript.com. The most interesting part about reading the documentation was actually finding the correct use of all those (as of today) undocumented commands in the Flash 6 player.

Flash JavaScript API
LiveMotion 2 had a lot of great things going for it before Adobe killed it (that's what we've heard at least). One of the coolest features was the ability to script elements and objects inside the Authoring environment. Now Flash gets this ability with the Flash JavaScript API. Some examples come with MX 2004 like the new PolyStar-tool (To be honest, we have never missed this tool ever, but when Adobe used it - why not do the same?).

The timeline effects are created using the JavaScript API. Using this extensibility, you can script the Flash timeline itself! Expect a load of cool new effects, commands, behaviors and tools created this way, or why not make some yourself? There are already people making money from selling components. Now they get even more possibilities and end users get better tools.

Devices
Flash MX 2004 will support direct use of native sounds on devices. If you want to use any of the built-in ringtones in your applications, you can do so. For devices, there's also a new set of templates that will let you see exactly how the final result will look for a device such as an iPaq.

 

Get new stories first

Click to follow us on Twitter!

 

Comments

No comments for this page.

Submit a comment

Only registered members can comment. Click here to login or here to register