basicamente existen 14 simbolos de pelicula en la biblioteca, 7 para las figuras y 7 para las otras que deben calzar en las figuras ya dibujadas por los datos que tiene el xml:
tx=new XML();
tx.ignoreWhite = true;
tx.load("aves.xml");
tx.onLoad = function(){
j=0;
for(i=1;i<8;i++){
_root.createEmptyMovieClip("f"+i(attachMovie("f"+i,"f"+i.i+10)));
_root["f"+i]._x = tx.firstChild.childNodes[0].childNodes[j].attributes.x;
_root["f"+i]._y = tx.firstChild.childNodes[0].childNodes[j].attributes.y;
_root["f"+i]._rotation = tx.firstChild.childNodes[0].childNodes[j].attributes.r;
j++;
}
k=0;
for(l=1;l<8;l++){
_root.attachMovie("p"+l,"p"+l,l+15);
_root["p"+l]._x = tx.firstChild.childNodes[10].childNodes[k].attributes.x;
_root["p"+l]._y = tx.firstChild.childNodes[10].childNodes[k].attributes.y
_root["p"+l]._rotation = tx.firstChild.childNodes[10].childNodes[k].attributes.r;
k++;
}
}
stop();
Aqui va los eventos asociados a las figuras que tienen que calzar, esto corresponde a un boton que va dentro de las figuras que tienen que calzar sobre las otras:
on(press){
i=this.indice;
this.startDrag();
if(_parent["f"+i].hitTest(this._x,this._y,true))with(_parent["f"+i]){
this.stopDrag();
this._x=_x;
this._y=_y;
this._rotation=_rotation;
}
}
on(release){this.stopDrag();}
Espero que me ayuden please!! si prefieren los archivos originales me los piden a
[email protected] Atentamente Mario Pando