
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Flash 4 Versus Flash 5 (and Later)
|
987
Flash 4 Events
Most ActionScript events were first introduced in Flash 5. If you’re exporting to
Flash 4 format, use the button event handlers only (only button events were sup-
ported in Flash 4), and test your work carefully in Flash Player 4. To determine
whether an event is supported by a particular version of the Flash Player, see the
appropriate event entry in the Language Reference.
Flash 4 Versus Flash 5 String Operators
The Flash 4 string concatenation operator (&) performs a different operation (i.e., bit-
wise AND) in Flash 5 and later. If you’re exporting a Flash 4 .swf file from a newer
version of Flash, you must use the add operator to concatenate strings. Note that add
is supported only for backward compatibility; the
+ operator is preferred in Flash 5
and later.
If you’re exporting a Flash 4 .swf file, you must use the older
eq and ne operators for
string equality (
==) and inequality (!=) comparisons. The == and != operators are
preferred in Flash 5 and later.
If you’re exporting a Flash 4 .swf file, you must use the older
gt, ge, lt, and le string
comparison operators. The
>, >=, <, and <= operators are the preferred equivalents in
Flash 5 and later.
If you’re exporting a Flash 4 .swf file, you must use the older length() function to