New in ActionScript 2.0 and Flash Player 8
The ActionScript language has grown and developed since its introduction several years ago. With each new release of Flash, additional keywords, objects, methods, and other language elements were added to ActionScript. There are also ActionScript-related improvements to the Flash 8 authoring environments. Flash Basic 8 and Flash Professional 8 introduced several new language elements for expressive features, such as filters and blending modes, and application development, such as JavaScript integration (ExternalInterface) and file input and output (FileReference and FileReferenceList).
This section provides an overview of the ActionScript language elements and classes that are new or changed in Flash 8 and ActionScript-related improvements to the authoring tool. For a list of specific additions to ActionScript 2.0, see Additions to the ActionScript language in Flash Player 8. To use any of the new language elements in your scripts, you must target Flash Player 8 when you publish your documents.
The following features were added to both Flash Basic 8 and Flash Professional 8 (unless noted otherwise):
- ActionScript editor enhancements let you show hidden characters in your scripts. For more information, see "Display hidden characters" in Using Flash.
- Debug options are now available in the Script window, as well as the Actions panel, for ActionScript files.
- The Configuration directory that includes XML files and Class files is reorganized. See "Configuration folders installed with Flash" in Using Flash for details.
- You can set a preference to reload modified script files when working on an application, which helps you avoid working with older versions of script files, and overwriting newer script files. For more information, see "Set ActionScript preferences" in Using Flash.
- The Script window feature is available in Flash. That means you can now create an ActionScript file in either program.
- Script Assist (similar to Normal Mode in earlier editions of Flash) helps you code without needing to understand syntax. For more information on Script Assist, see "About Script Assist mode" in Using Flash.
- You can load new kinds of image files at runtime, which include progressive JPEG images, and non-animated GIF and PNG files. If you load an animated file, the first frame of the animation appears.
- You can assign linkage identifiers to bitmap and sound files stored in the Library, which means that you can attach images to the Stage or work with these assets in shared libraries.
- Bitmap caching lets you improve the performance of your applications at runtime by caching a bitmap representation of your instances. You can use ActionScript code to access this property. For more information, see About bitmap caching, scrolling, and performance.
- 9-slice scaling lets you scale movie clip instances without widening the strokes that outline the movie clip. You can use ActionScript code to access this feature in Flash. For more information, see Working with 9-slice scaling in ActionScript. For information about accessing 9-slice scaling in the authoring tool, see Using Flash.
- You can now add metadata information to your FLA files in the Document Properties dialog box. You can add a name and description to your FLA file using the dialog box to help increase online search visibility.
- The Strings panel is improved to include multiline support in the String field and a language XML file. For more information, see panel.
- A new garbage collector is built into Flash Player, which uses an incremental collector to improve performance.
- The workflow for creating accessible applications is improved. Flash Player 8 no longer requires developers to add all objects to the tab index for content to be read correctly by a screen reader. For more information on tab index, see
tabIndex (Button.tabIndex property), tabIndex (MovieClip.tabIndex property), and tabIndex (TextField.tabIndex property) in the ActionScript 2.0 Language Reference.
- Flash Player has improved local file security, for additional safety when running SWF files on your hard disk. For information on local file security, see About local file security and Flash Player.
- Using ActionScript code, you can use the Drawing API to control the line style of strokes that you draw. For information on new line styles, see Using line styles.
- Using ActionScript code, you can use the Drawing API to create more complex gradients that you fill shapes with. For information on gradient fills, see Using complex gradient fills.
- You can use ActionScript code to apply many filters to objects on the Stage (such as movie clip instances). For information on filters and ActionScript, see Working with filters using ActionScript.
- You can use the FileReference and FileReferenceList API to upload files to a server. For more information, see About file uploading and downloading.
- You can use ActionScript code to access new and advanced ways of applying and manipulating colors. For more information, see Setting color values and
ColorTransform (flash.geom.ColorTransform) in the ActionScript 2.0 Language Reference.
- Numerous improvements are made to text handling, including new options, properties, and parameters in the TextField and TextFormat classes. For more information, see
TextField and TextFormat in the ActionScript 2.0 Language Reference.
- You can use ActionScript code to access advanced anti-aliasing features. For more information, see About font rendering and anti-alias text.
- You can delete ASO files when you test your application. Select Control > Delete ASO files or Control > Delete ASO files and Test Movie in the authoring tool. For information, see Using ASO files.
For a list of specific classes, language elements, methods, and properties added to ActionScript 2.0 in Flash 8, see "Set ActionScript preferences" in Using Flash.