Operators - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

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

Advertisement

Example
In the following example, the keyword
function Circle(radius:Number):Void {
this.radius = radius;
this.area = Math.PI*Math.pow(radius, 2);
}
var myCircle = new Circle(4);
trace(myCircle.area);
In the following statement assigned to a frame inside a movie clip, the keyword
references the current movie clip.
// sets the alpha property of the current movie clip to 20
this._alpha = 20;
In the following statement inside a MovieClip.onPress handler, the keyword
the current movie clip:
this.square_mc.onPress = function() {
startDrag(this);
};
this.square_mc.onRelease = function() {
stopDrag();
};
See also
,
on handler
onClipEvent handler

Operators

Symbolic operators are characters that specify how to combine, compare, or modify the values
of an expression.
Operators summary
Operator
+ (addition)
+=
(addition
assignment)
[]
(array
access)
112
ActionScript language elements
references the Circle object:
this
Description
Adds numeric expressions or concatenates (combines)
strings.
Assigns expression1 the value of expression1 +
expression2.
Initializes a new array or multidimensional array with the
specified elements (a0 , and so on), or accesses
elements in an array.
this
references
this

Advertisement

Table of Contents
loading

Table of Contents