Skip to main content
Inspiring
September 6, 2018
Answered

GSAP with Canvas in Animate - cannot tween masked movieclip?

  • September 6, 2018
  • 1 reply
  • 638 views

Hi there,

I'm using the GSAP TweenMax library with my Animate project and I'm trying to tween in a couple of movieclips, one of which is a mask. When I test my project I get the error "Cannot tween a null target" This only happens when I add in my mask movieclip to the tween, so I imagine that is what is causing the problem? Does anyone have any experience with this / know of a workaround?

I'm using GSAP simply because I'm more familiar with it than I am with TweenJS - would it be better to use TweenJS in this instance? Can mask movieclips be tweened then?

Any advice is appreciated, thanks!

This topic has been closed for replies.
Correct answer ClayUUID

It's always better to use TweenJS if you can, because then you're not imposing the download of yet another library on every user.

As for masks, timeline masks are converted to internally-named vector shapes on publish, because that's what the canvas element natively works with. The original symbol is discarded as part of this process.

Animate CC Masking in the Actions Panel?

Masked Custom Cursor?

Canvas Element and masks

1 reply

ClayUUIDCorrect answer
Legend
September 6, 2018

It's always better to use TweenJS if you can, because then you're not imposing the download of yet another library on every user.

As for masks, timeline masks are converted to internally-named vector shapes on publish, because that's what the canvas element natively works with. The original symbol is discarded as part of this process.

Animate CC Masking in the Actions Panel?

Masked Custom Cursor?

Canvas Element and masks