Skip to main content
Inspiring
December 1, 2023
Question

mask

  • December 1, 2023
  • 1 reply
  • 853 views

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 has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 2, 2023

you have to use a shape as the mask.

peorAuthor
Inspiring
December 3, 2023

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

kglad
Community Expert
Community Expert
December 3, 2023

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;