Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

GSAP with Canvas in Animate - cannot tween masked movieclip?

Engaged ,
Sep 06, 2018 Sep 06, 2018

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!

596
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 06, 2018 Sep 06, 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

Translate
LEGEND ,
Sep 06, 2018 Sep 06, 2018
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines