MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 113

Actionscript language reference
Table of Contents

Advertisement

/* To clear the read-only flag in the flags variable, first construct a mask by
using bitwise NOT on ReadOnlyFlag. In the mask, every bit is a 1 except for
the read-only flag. Then, use bitwise AND with the mask to clear the read-
only flag. The following code constructs the mask and performs the bitwise
AND: */
flags &= ~ReadOnlyFlag;
trace(flags);
/* output:
0
1
0
*/
See also
& (bitwise AND)
,
assignment)
| (bitwise OR)
+ (addition)
Availability
Flash Player 5.
Usage
expression1 + expression2
Parameters
expression1,expression2
Returns
A string, integer, or floating-point number.
Description
Operator; adds numeric expressions or concatenates (combines) strings. If one expression is a
string, all other expressions are converted to strings and concatenated.
If both expressions are integers, the sum is an integer; if either or both expressions are floating-
point numbers, the sum is a floating-point number.
For more information, see
Example
Usage 1: The following example concatenates two strings and writes the result to the log file.
var name:String = "Cola";
var instrument:String = "Drums";
trace(name+" plays "+instrument);
Usage 2: This statement adds the integers 2 and 3 and writes the resulting integer, 5, to the log
file:
trace(2+3);
,
&= (bitwise AND assignment)
,
|= (bitwise OR assignment)
A number or string.
"Operator precedence and associativity" on page
// output: 5
,
^ (bitwise XOR)
// output: Cola plays Drums
,
^= (bitwise XOR
32.
+ (addition)
113

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents