This site is now just an archive over the rise and fall of Flash. The domain flashmagazine.com is available for sale
Login | Register
Flash MX - News for ActionScripters

Flash MX - News for ActionScripters

Most of the stuff for programmers is more of a natural progression of ActionScript. . ActionScript has become even more ECMA compliant and have gotten serious improvements.

4th MARCH 2002, by Jens C. Brynildsen A major change is that you can now do simple scripting of buttons like movieClips. These have fewer properties, but are essentially a 'scaled down movieClip'. What might be interesting about this is the added speed if these objects don't need to refresh as much information as the movieClip Object. Maybe we'll use Buttons instead if we need speed?

1 New events
New events such as onKillFocus, onSetFocus, onUpdate, onChanged and onSoundComplete. Some of these have been sorely missed, so the addition is very welcome!

2 Prototypes / classes
They are now officially documented. Discovered by Branden Hall and the chattyfig list, these allow you to 'rebuild' the way Flash works adding new functionality to the program. Another nice addition is the _global command letting you easily register your functions much like prototypes. This will add them to the global scope and they will then be available to all objects they apply to. Flash MX also gives access to the Superclass of Flash MX allowing you to add custom classes.

3 Programmatic drawing
Flash MX gives you direct control of the points in basic shapes using new commands. Commands like beginFill, beginGradientFill, clear, curveTo, endFill, lineStyle, lineTo, moveTo promise to be a lot of fun! Just tell Flash to create an empty movieclip and start filling it up ;)

4 Improved XML
XML was a major new feature in Flash 5. It wasn't free of bugs though, and it took Macromedia some weeks to patch the errors. This caused it to be two kinds of Flash 5 plugins: Those that handled XML well and not. Colin Moock made a neat script to fix the whitespace problem and Branden Hall created XML Nitro to speed up the processing of XML files inside Flash. Now these snippets of actionscript code are more or less 'built in', so XML parsing should be error free and speedy.

5 Editor with code hints
The new ActionScript Editor seems nice, and I'm already looking forward to not having to pop that window up and down all the time. It now docks easily together with other components and has code hinting added to it. The addition of Line numbers is welcome and it now has a neat popup reference, giving you the syntax of a highlighted element.

6 Switch / Case statements
I always wondered why it was left out of the Flash 5 version of ActionScript? Now it's there and I know I'll be using it a lot.

7 Interval statements
In former Flash versions you sometimes needed to make a special movieClip to make sure a piece of script was executed every now and then. Flash MX gives you an easier option. Functions can now be called with interval statements telling them how often to run. This does not depend on the playhead moving at all, so if you want a function to run every 5 seconds you just set the interval and off it goes running you function at certain intervals. Neat!

8 Text
Flash MX has massive support for scripting text fields, setting tab sequences, adding 'listeners' to trigger on events, changing fonts and I think absolutely all aspects of the fields. Not only that, but the selection object have been fixed, and should now work properly. This means that we can now create WYSIWYG text editors and do pretty much anything to text objects.

9 Programmable sound?
A readable pointer value in sound files indicating the current position in the file seems interesting. Unfortunately not possible to Set this one, but you could maybe restart it with a different 'secondOffset' at certain times? Should make it possible to create a small 'tracker' module or something? The onSoundComplete event can probably be used to programmatically program looping and such.

10 New Objects
A new Stage object that will return general info such as active area. This one can also respond to a resize-event. System Object: Can detect audio playback and recording, webcam, screenDPI, OS and more. Other new objects are textField, textFormat, Video, accessabilities and more.

Make sure you also read our stories on the Big News , News for Designers and The Downside.

 

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