Hi,
here you have a simple example:
code:
MovieClip.prototype.resize = function() {
this._xscale = this._xscale * 2;
this._yscale = this._yscale * 2;
};
//if you have a mc called ball_mc
//this doubles its size:
ball_mc.resize();
now you can apply this method to any movie clip
you can also have your own objects.
for example a paper sheet with color and size:
code:
Paper = function (pColor, pSize) {
this.pColor = pColor;
this.pSize = pSize;
};
p1 = new Paper("white", "A4");
trace(p1.pColor);
Paper.prototype.changeColor = function(pColor) {
this.pColor = pColor;
};
p1.changeColor("black");
trace(p1.pColor);
this is not the most correct way to modify an object properties... But as an example I think it will do