MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 789

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

The
operator in Flash 4 was used for numeric equality. In Flash 5 and later,
=
equality operator and
automatically converted to
Flash automatically performs type conversions to ensure that operators behave as
expected. Because of the introduction of multiple data types, the following operators have
new meanings:
,
,
,
,
,
,
+
==
!=
<>
<
>
>=
In Flash 4 ActionScript, these operators were always numeric operators. In Flash 5 and
later, they behave differently, depending on the data types of the operands. To prevent
semantic differences in imported files, the
operands to these operators. (Constant numbers are already obvious numbers, so they are
not enclosed in
Number().
table in
"About operator precedence and associativity" on page 179
4 operators" on page
In Flash 4, the escape sequence
Flash 5 and later, to comply with the ECMA-262 standard,
character (ASCII 10). An
to
.
\r
The
operator in Flash 4 was used for string addition. In Flash 5 and later,
&
AND operator. The string addition operator is now called
files are automatically converted to
Many functions in Flash 4 did not require closing parentheses; for example,
,
Set Variable
Stop
all actions now require parentheses [
during the conversion.
In Flash 5 and later, when the
doesn't exist, it returns the value
in ActionScript after Flash 4 (in Flash 4,
false
solve this problem when converting Flash 4 files by introducing
equality comparisons. In the following example,
converted to
so the comparison will succeed:
0
getProperty("clip", _width) == 0
Number(getProperty("clip", _width)) == Number(0)
If you used any Flash 5 or later keywords as variable names in your Flash 4
ActionScript, the syntax returns an error when you compile it in Flash 8. To solve this
problem, rename your variables in all locations. For information, see
words" on page 139
is the assignment operator. Any
=
.
==
,
<=
) For more information on these operators, see the operator
779.
generated a carriage return character (ASCII 13). In
\n
sequence in Flash 4 FLA files is automatically converted
\n
operators.
add
, and
. To create consistent syntax, the
Play
]. These parentheses are automatically added
()
getProperty
undefined
and
"About naming variables" on page
Using Flash 8 to create content for Flash Player 4
operators in Flash 4 files are
=
function is inserted around all
Number()
generates a line-feed
\n
. Any
add
function is executed on a movie clip that
, not
. The statement
0
undefined == 1
forces
Number()
is the
==
and
"Deprecated Flash
is the bitwise
&
operators in Flash 4
&
Get Timer
function and
getTimer
undefined == 0
). In Flash 5 and later,
functions in
Number()
to be
undefined
"About reserved
91.
,
is
789

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents