Hi,

I have this code:

Actionscript Code:
public class myHitTest extends MovieClip
    {
var myClip:MyClip;
        public function myHitTest()
        {
            init();
        }
       
        public function init():void
        {
           
myClip = new MyClip();
addChild(myClip);
myClip.addEventListener(Event.ENTER_FRAME,_enterFrame);
            myClip.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
            myClip.addEventListener(MouseEvent.MOUSE_UP,stopDragging);
        }
       
        private function startDragging(event:MouseEvent):void
        {
            myClip.startDrag();
        }
       
        private function stopDragging(event:MouseEvent):void
        {
            myClip.stopDrag();
        }
    }

if I had more than one MovieClips that should be dragged. how should I change the code for xample I have another MC called myOtherClip and I want it also to use the functions startDraggging() and stopDragging() but I dont want to write myOtherClip.startDrag();
and so on.

I want to have multiple MCs to be able to be dragged.
thanks!