I have a series of buttons,i can drag and drop them, but i need them to go back to their original position if they hit their first position…
fscommand("fullscreen", true);
fscommand("allowscale", false);
Stage.showMenu = false;
stop();
//------------Start buttons functions------------------------
var buttons:Array = new Array({instance:btn_01}, {instance:btn_02});
//------------Start movie proprieties------------------------
onEnterFrame = function () {
for (var k:Number = 0; k<buttons.length; k++) {
buttons[k].instance.onPress = function() {
this.startDrag();
this.onEnterFrame = function() {
btn_text.text = "X = "+(50/circle_mc._width)*this._x+" %";
btn_text2.text = "Y = "+(50/circle_mc._height)*this._y+" %";
};
};
buttons[k].instance.onRelease = buttons[k].instance.onReleaseOutside=function () {
this.stopDrag();
released = true;
this.onEnterFrame = function() {
if (this.hitTest(_root.circle_mc)) {
this.gotoAndStop(2);
} else {
if (this.hitTest(_root.menu_bkg)) {
this.gotoAndStop(1);
}
}
};
};
}
};