Writing Scripts with ActionScript > Using Flash 5 to create Flash 4 content
Using Flash 5 to create Flash 4 contentIf you are using Flash 5 to create content for the Flash 4 Player (by exporting as Flash 4), you won't be able to take advantage of all the new features present in Flash 5 ActionScript. However, many new ActionScript features are still available. 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 the Flash 4 Player, you need to use the deprecated string operators located in the String Operators category in the toolbox.
You can use the following Flash 5 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(% ), all methods and properties of the Math object. |
These operators and functions are not supported natively by the Flash 4 Player. Flash 5 must export them as series approximations. This means that the results are only approximate. In addition, due to 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 SWF files. | |
![]() |
The for , while , do..while , break , and continue actions. |
![]() |
The print and printAsBitmap actions. |
The following Flash 5 features can't be used in movies exported to the Flash 4 SWF file format:
![]() |
Custom functions |
![]() |
XML support |
![]() |
Local variables |
![]() |
Predefined objects (except Math) |
![]() |
Movie clip actions |
![]() |
Multiple data types |
![]() |
eval with dot syntax (for example, eval("_root.movieclip.variable") ) |
![]() |
return |
![]() |
new |
![]() |
delete |
![]() |
typeof |
![]() |
for..in |
![]() |
keycode |
![]() |
targetPath |
![]() |
escape |
![]() |
globalToLocal and localToGlobal |
![]() |
hitTest |
![]() |
isFinite and inNaN |
![]() |
parseFloat and parseInt |
![]() |
unescape |
![]() |
_xmouse and _ymouse |
![]() |
_quality |