MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 69

Actionscript language reference
Table of Contents

Advertisement

/* To set the read-only flag in the flags variable, the following code uses the
bitwise OR: */
flags |= ReadOnlyFlag;
trace(flags);
/* 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
&= (bitwise AND
assignment),
OR),
|= (bitwise OR assignment)
^ (bitwise
XOR),
^= (bitwise XOR
~ (bitwise NOT)
69

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents