The String Operators
Special string operators—concatenation
(&
), equality (eq
),
inequality (ne
), and comparison
(lt
, gt
, le
,
ge
)—were required when using string data in
Flash 4. In Flash 5 and later, the special string operators are
deprecated (i.e., supported but obsolete). Use
==
, !=
,
<
, >
,
<=
, and >=
for string
comparisons, unless exporting to Flash 4 .swf
format, in which case you must use the old operators (eq
, ne
, lt
,
gt
, le
, ge
).
Use +
for string concatenation, unless exporting
to Flash 4 format, in which case you should use
add
instead of &
(because
&
is the bitwise AND operator in Flash 5 and
later).
For more details and a list of Flash 4 versus Flash 5 string-operation equivalencies, see Section 4.6 and Table 4.2 in Chapter 4.
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.