MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 979

Actionscript language reference
Table of Contents

Advertisement

}
}
Inside the FLA or AS file, add the following ActionScript:
var obj:Simple = new Simple();
obj.num = 0;
obj.func = function() {
return true;
};
obj.callfunc();
// output: true
You get a syntax error when you use the incorrect version of Simple.as.
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
the current movie clip.
// sets the alpha property of the current movie clip to 20
this._alpha = 20;
In the following statement inside a
current movie clip:
this.square_mc.onPress = function() {
startDrag(this);
};
this.square_mc.onRelease = function() {
stopDrag();
};
See also
on(),
onClipEvent()
references the Circle object:
this
MovieClip.onPress
handler, the keyword
references
this
references the
this
this
979

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents