Download Flash Lite 2.x and 3.x ActionScript Language Reference

Transcript
FLASH LITE 2.X AND 3.X ACTIONSCRIPT LANGUAGE REFERENCE
ActionScript language elements
Deprecated since Flash Player 5. Adobe recommends you use the addition (+) operator when creating content for
Flash Player 5 or later.
Note: Flash Lite 2.0 also deprecates the add operator in favor of the addition (+) operator.
Concatenates two or more strings. The add (+) operator replaces the Flash 4 & operator; Flash Player 4 files that use
the & operator are automatically converted to use the add (+) operator for string concatenation when brought into the
Flash 5 or later authoring environment. You must use the add (+) operator to concatenate strings if you are creating
content for Flash Player 4 or earlier versions of the Flash Player.
Availability
Flash Lite 1.0
Operands
string1 : String - A string.
string2 : String - A string.
Returns
String - The concatenated string.
See also
+ addition operator
?: conditional operator
expression1 ? expression2 : expression3
Instructs Flash to evaluate expression1, and if the value of expression1 is true, it returns the value of expression2;
otherwise it returns the value of expression3.
Availability
Flash Lite 1.0
Operands
expression1 : Object - An expression that evaluates to a Boolean value; usually a comparison expression, such as
x < 5.
expression2 : Object - Values of any type.
expression3 : Object - Values of any type.
Returns
Object - The value of expression2 or expression3.
Example
The following statement assigns the value of variable x to variable z because expression1 evaluates to true:
var x:Number = 5;
var y:Number = 10;
var z = (x < 6) ? x: y;
trace (z); // returns 5
Last updated 12/20/2010
92