MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE Reference page 109

Flash lite 1.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Description
Operator (arithmetic compound assignment); assigns
the value of
expression1
. No value is returned.
expression1 - expression2
For example, the following two statements are the same:
x -= y;
x = x - y;
String expressions must be converted to numbers; otherwise, -1 is returned.
Example
Usage 1: The following example uses the
operator to subtract 10 from 5 and assign the
-=
result to the variable
:
x
x = 2;
y = 3;
x -= y
trace(x);// output: -1
Usage 2: The following example shows how strings are converted to numbers:
x = "2";
y = "5";
x -= y;
trace(x);// output: -3
-= (subtraction assignment)
109

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Table of Contents