the content you want to mask does not have to be inside the movie clip mask. usually a mask is just a rectangular sprite / figure, in which there is nothing but a picture on a graphic canvas.
var mask:Shape = new Shape(); mask.graphics.beginFill(0xff0000, 1); mask.graphics.drawRect(0, 0, 20, 20); addChild(mask);
then you will create a container:
var container:Sprite = new Sprite(); addChild(container); container.mask = mask;
and then just add eventlistener to the container:
container.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); private function onMouseDown(evt:MouseEvent):void { container.startDrag(); }
you can also add additional MCs to the container sprite ...
example on wonderfl: http://wonderfl.net/c/nqpN
source share