MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 338

Actionscript language reference
Table of Contents

Advertisement

this.radius = radius;
this.getArea = function(){
return Math.PI*this.radius*this.radius;
};
this.getDiameter = function() {
return 2*this.radius;
};
this.setRadius = function(param_radius) {
this.radius = param_radius;
}
}
// ActionScript 2.0 code that uses the Circle class
var myCircle:Circle = new Circle(5);
trace(myCircle.getArea());
trace(myCircle.getDiameter());
myCircle.setRadius("10");
trace(myCircle.radius);
trace(myCircle.getArea());
trace(myCircle.getDiameter());
See also
class,
implements
338
Chapter 2: ActionScript Language Reference

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents