# Bck to it's original position

**URL:** https://forum.kirupa.com/t/bck-to-its-original-position/197188
**Category:** flash
**Created:** [August 14, 2006, 4:02pm UTC](https://forum.kirupa.com/t/bck-to-its-original-position/197188 "2006-08-14T16:02:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![azik1uk](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@azik1uk](https://forum.kirupa.com/u/azik1uk)
#### Post date: [August 14, 2006, 4:02pm UTC](https://forum.kirupa.com/t/bck-to-its-original-position/197188/1 "2006-08-14T16:02:58Z")

</div>

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…

```auto

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);
                    }
                }
            };
        };
    }
};

```
