Help with dragging a nested MC around global stage

Hi guys,

I have a simple popup dialog box which exists in a movieclip within the timeline of a loaded movie. I would like to be able to drag this dialog within the bounds of the parent movie (i.e. global stage) and not be confined to the dialogs parent clip and ultimately parent movie. …Hope that makes sense!?

Within my dialog_mc I have a clip called drag_mc which the user clicks to drag dialog (the specifics are below)

Path:
_root.site_mc.gallery_mc.dialog_mc

Registration point:
top left


drag_mc.onPress = function() {
	var rbound = Stage.width-this._parent._width;
	var bbound = Stage.height-this._parent._height;
	this._parent.startDrag(false, 0, 0, rbound, bbound);
};
drag_mc.onRelease = function() {
	this._parent.stopDrag();
};
drag_mc.onReleaseOutside = drag_mc.onRelease;

Thanks in advance! :smiley: