Drag problem

Hi,

i am trying to attach a movie and then drag it, this works but the code to stop the drag does not. any ideas why??

myButton.onPress = function() {
                            dragger = attachMovie("dragger", "dragger2", 5);
                            dragger._x = this._x 
                            dragger._y = this._y 
                            dragger.startDrag();
                        };
                        myButton.onRelease = function() {
                dragger.stopDrag();
                        };

Perhaps referencing. try [AS]myButton.onPress = function() {
_parent.dragger = attachMovie(“dragger”, “dragger2”, 5);
_parent.dragger._x = this._x
_parent.dragger._y = this._y
_parent.dragger.startDrag();
};
myButton.onRelease = function() {
_parent.dragger.stopDrag();
};
[/AS]

hi, thanks for the reply…

i found that using the onReleaseoutside event worked.