Dynamic Mask
I'm trying to create a mask that follows an object when the object is dragged. So far I'm using this code for the drag and drop of the object and the mask following that object:
this.Handle.on("pressmove", moveHandle);
function moveHandle(e) {
var p = stage.globalToLocal(e.stageX, e.stageY)
e.currentTarget.x = p.x;
exportRoot.LeftMask.x = exportRoot.Handle.x;
}
The mask is set to a MovieClip. This works fine until I set it to a mask on the layers panel, then it then doesn't mask what's underneath it.
Do I have to dynamically set the mask? Is there a way of dynamically setting a mask when it is a MovieClip?
