miren mi codigo del drag & drop (tienen que arrastrar la palabra a la parte del cuerpo)
agradezco cualquier ayuda que me den!!!
correcto = 0;
hair.onPress = function() {
this.startDrag();
_root.cart.gotoAndStop(1);
aa = hair._x;
bb = hair._y;
}
hair.onRelease = function() {
if (this.hitTest(hair_destino)) {
this.stopDrag();
this._x = hair_destino._x;
this._y = hair_destino._y;
_root.cart.gotoAndStop(2);
delete this.onPress;
correcto++;
if(correcto eq 2){
trace ("you make it =D");
}
}
else {
this.stopDrag();
_root.cart.gotoAndStop(3);
this._x = aa;
this._y = bb;
}
};
hands.onPress = function() {
this.startDrag();
_root.cart.gotoAndStop(1);
haX = hands._x;
haY = hands._y;
}
hands.onRelease = function() {
if (this.hitTest(hands_destino)) {
this.stopDrag();
this._x = hands_destino._x;
this._y = hands_destino._y;
_root.cart.gotoAndStop(2);
delete this.onPress;
correcto++;
if(correcto eq 2){
trace ("you make it =D");
}
}
else {
this.stopDrag();
_root.cart.gotoAndStop(3);
this._x = haX;
this._y = haY;
}
};
