the answer to my own question...
stop();
box_mc.onPress = function() {
// if the CTRL key is down, rotate the clip
if (Key.isDown(Key.CONTROL)) {
// calculate the offset angle necessary to avoid "jumping"
xdiff = _root._xmouse-box_mc._x;
ydiff = _root._ymouse-box_mc._y;
offset = Math.atan2(ydiff, xdiff)*180/Math.PI-this._rotation;
// set the sprite enterframe event for regular processing
this.onEnterFrame = function() {
// make the sprite point at the mouse
xdiff = _root._xmouse-box_mc._x;
ydiff = _root._ymouse-box_mc._y;
angle = Math.atan2(ydiff, xdiff)*180/Math.PI;
// use the offset angle to avoid "jumping"
box_mc._rotation = angle-offset;
}
// if the CTRL key is up, drag the clip
} else {
this.startDrag (false);
}
}
box_mc.onRelease = function() {
// stop dragging
stopDrag();
// stop rotating
delete this.onEnterFrame;
}
box_mc.onReleaseOutside = function() {
// stop rotating
delete this.onEnterFrame;
}