Copy link to clipboard
Copied
I'd like to apply a gradient/feathered mask to a MovieClip in Canvas. I've researched and tried various methods but haven't been successful with getting anything to work.
Ideally I'd like the gradient mask to be a MovieClip so I can easily tween it over the masked content, which rules out using AlphaMaskFilter.
Is there anyone out there that could offer me some code or advice on how to achieve this?
You can apply a composite mode to the MovieClip that will be your mask.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I actually came across this video prior to posting this. Unfortunately I couldn't get it to work. Appreciate the suggestion though.
Copy link to clipboard
Copied
you couldn't follow the steps? (i noticed the audio was poor.)
Copy link to clipboard
Copied
You can apply a composite mode to the MovieClip that will be your mask.
if(!this.init) {
this.msk.compositeOperation = "destination-in"; // change the composite mode to your needs.
this.timeline.on('change', () => this.updateCache()); // this updates the cache as the frame changes
this.init = true;
}
Copy link to clipboard
Copied
Amazing. This worked a treat. Thank you!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now