Skip to main content
Inspiring
Dec 1, 2023 9:22 PM UTC
Question

mask

Why doesn't mask work with javascript codes in Animate. I have tried with mask graphic symbol and content movieclip but I have not succeeded. But in zim's scrollbar there content.setMask(mask) works; why not working content.mask = mask;

This topic is closed to new replies. Start a new post to keep the conversation going.

13 replies

kglad
Community Expert
Community Expert
Dec 2, 2023 12:28 PM UTC

you have to use a shape as the mask.

Translate
peorAuthor
Inspiring
Dec 3, 2023 1:26 PM UTC

Can you give me one example fla file how to use mask with Shapes/Graphics as works.

Translate
kglad
Community Expert
Community Expert
Dec 3, 2023 3:10 PM UTC

mask_shape = new createjs.Shape();
mask_shape.graphics.beginFill("blue").drawCircle(0,0,50);

 

mask_shape.visible = false; // hiding the maskshape

content.mask = mask_shape;

 

Translate