Understanding the ActionScript Language > Using Flash MX ActionScript with older versions of Flash > Using Flash MX to create content for Flash Player 4

 

Using Flash MX to create content for Flash Player 4

To use Flash MX to create content for Flash Player 4, set the export version to Flash 4 when you publish your movie. Flash 4 ActionScript has only one basic primitive data type, which is used for both numeric and string manipulation. When you author a movie for Flash Player 4, you must use the deprecated string operators located in the Deprecated > Operators category in the Actions toolbox.

You can use the following Flash 5 and Flash MX features when you export to the Flash 4 SWF file format:

The array and object access operator ([])

The dot operator (.)

Logical operators, assignment operators, and pre-increment and post-increment/decrement operators

The modulo operator (%), and all methods and properties of the Math object

These operators and functions are not supported natively by Flash Player 4. Flash MX exports them as series approximations, which creates results that are less numerically accurate. In addition, because of the inclusion of series approximations in the SWF file, these functions take up more room in Flash 4 SWF files than they do in Flash 5 or later SWF files.

The for, while, do..while, break, and continue actions

The print and printAsBitmap actions

The switch action

The following ActionScript features can't be used in movies exported to the Flash Player 4 file format:

Built-in objects (except Math)

isFinite

localToGlobal

parseFloat

typeof

Custom functions

isNaN

Local variables

parseInt

unescape

delete

for..in

Movie clip methods

_quality

XML elements

escape

globalToLocal

Multiple data types

return

_xmouse

eval with dot syntax—for example, eval("_root.movieclip.variable")

hitTest

new

targetPath

_ymouse