
Код:
//Actionscript 1.0
#initclip
function footballer(){
this.createFootballer();
}
footballer.prototype=new MovieClip();
Object.registerClass("footballer", footballer);
footballer.prototype.getTShirtColor(){
return this.tShirt_color.getRGB();
}
footballer.prototype.setTShirtColor(n){
this.tShirt_color.setRGB(n)
}
footballer.prototype.addProperty("tShirtColor",footballer.prototype.getTShirtColor,footballer.prototype.setTShirtColor);
footballer.prototype.createFootBaller(){
this.tShirt=this.attachMovie("majka","majka_mc",2);
this.tShirt_color=new Color(this.tShirt);
this.tShirtColor=this.majka;
delete this.majka;
}
#endinitclip
//simple of use footballer component
var myFootballer=this.attachMovie("footballer","footballer_mc",2,{_x:50, _y:50, majka:0x0000FF});