MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 259

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

-= (subtraction assignment)
Availability
Flash Player 4.
Usage
expression1 -= expression2
Parameters
expression1,expression2
Returns
Nothing.
Description
Operator (arithmetic compound assignment); assigns
. For example, the following two statements are the same:
expression2
x -= y;
x = x - y;
String expressions must be converted to numbers; otherwise,
Example
Usage 1: The following example uses the
to the variable
.
x
x = 5;
y = 10;
x -= y
trace(x);
//returns -5
Usage 2: The following example shows how strings are converted to numbers.
x = "5";
y = "10";
x -= y;
trace(x);
// returns -5
A number or expression that evaluates to a number.
operator to subtract 10 from 5 and assign the result
-=
the value of
expression1
is returned.
NaN
-= (subtraction assignment)
expression1 -
259

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents