Copy link to clipboard
Copied
I'm having problems moving a mask around using javascript, so that only a part of a movieclip in a layer is revealed.
If I go down the built in Animate/Flash route and go to the Timeline, making a layer into a mask.
If the layer is not a mask I can move the this movieclip symbol around referencing:
mask_symbol.x = something...
mask_symbol.y = something...
If I then turn the layer into a mask and use the same code to alter x and y of the movieclip mask, javascript reports an error: "unable to get property 'x' of undefined or null reference"
The movieclip mask is a single frame and two layers.
If I try creating a mask using Createjs code, I can create a mask shape, attach it to a movieclip I want to mask and move the mask around, but the movieclip to be masked is completely shows nothing, even when the mask shape is positioned over the top of the movieclip that area shows nothing.
I have tried using a bitmap or a shape object in the movieclip to be masked.
Looks like you and this guy have basically the same question:
Copy link to clipboard
Copied
open your js and check the mask's variable name. (it's probably mask). you can control the x property of the mask variable:
mask.x=whatever
and you can use code to create and animate your mask but there are several gotchas including the mask must be created with basic lineto's and curveto's.
Copy link to clipboard
Copied
Looks like you and this guy have basically the same question:
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more