Lancet Dispatch
07-26-2008, 11:44 PM
So I'm still having problems with my multiple item dragging code. I used this:
on(press){
offsetX = _root.clip2._x - _root.clip1._x;
offsetY = _root.clip2._y - _root.clip1._y;
offsetX = _root.clip3._x - _root.clip1._x;
offsetY = _root.clip3._y - _root.clip1._y;
offsetX = _root.clip4._x - _root.clip1._x;
offsetY = _root.clip4._y - _root.clip1._y;
startDrag(_root.clip1);
dragging = true;
}
onClipEvent(mouseMove){
if (dragging){
_root.clip2._x = _root.clip1._x + offsetX;
_root.clip2._y = _root.clip1._y + offsetY;
_root.clip4._x = _root.clip1._x + offsetX;
_root.clip4._y = _root.clip1._y + offsetY;
}
}
on (release) {
stopDrag();
dragging = false;
}
What I wanna do is have more than two movie clips being dragged. How would I do that?
I appreciate all the help I'm getting, possibly one of the best forums I've found for AS solutions.
on(press){
offsetX = _root.clip2._x - _root.clip1._x;
offsetY = _root.clip2._y - _root.clip1._y;
offsetX = _root.clip3._x - _root.clip1._x;
offsetY = _root.clip3._y - _root.clip1._y;
offsetX = _root.clip4._x - _root.clip1._x;
offsetY = _root.clip4._y - _root.clip1._y;
startDrag(_root.clip1);
dragging = true;
}
onClipEvent(mouseMove){
if (dragging){
_root.clip2._x = _root.clip1._x + offsetX;
_root.clip2._y = _root.clip1._y + offsetY;
_root.clip4._x = _root.clip1._x + offsetX;
_root.clip4._y = _root.clip1._y + offsetY;
}
}
on (release) {
stopDrag();
dragging = false;
}
What I wanna do is have more than two movie clips being dragged. How would I do that?
I appreciate all the help I'm getting, possibly one of the best forums I've found for AS solutions.