Here's a problem that's probably been asked many times but in all of my
searching I haven't found a good workaround for it. Maybe someone can think
of one or suggest one? Or if someone knows of a good workaround, please give
me the URL.

I need to drag two (and potentially more) movie clips simultaneously. I am
developing a Flash-based drawing application which will have a "group"
function that allows multiple objects to be repositioned at the same time.

I've distilled the problem down to this: Suppose I have two movie clips, one
called "master" and the other called "slave". When the master clip is
dragged, the slave clip should move by the same amount, so that it appears
that they move as a "group".

Here's what I have so far. In this code sample, which can be viewed at
[url]http://www.tufat.com/MasterSlave.swf[/url] , when the master moves, the slave
moves with it, but not exactly, because the slave starts falling behind.
What *should* happen is that the slave should move by exactly the same x,y
amount that the master moves, in the same direction that the master moves.
I've tried increasing the movie frame rate, but it didn't do any good.

master.onMouseMove = function()
{
// adjust the position of the slave clip
if ( this.hitTest( _root._xmouse, _root._ymouse ) && this.dragging )
{
_root.slave._x += this._x - this.origX;
_root.slave._y += this._y - this.origY;

// reset the original X and Y values
this.origX = this._x;
this.origY = this._y;
}
}

master.onEnterFrame = function()
{
this.origX = this._x;
this.origY = this._y;
}

master.onMouseDown = function()
{
if ( this.hitTest( _root._xmouse, _root._ymouse ) )
{
this.dragging = true;
this.startDrag();
}
}

master.onMouseUp = function()
{
this.dragging = false;
stopDrag();
}