Jump to content
Search Community

GSAP in Flash Canvas - Null Target Error on Masks

mcstampfunk test
Moderator Tag

Recommended Posts

Hi All,

 

I am trying to animate a mask in a Flash HTML5 Canvas document using TweenLite. I am trying to animate a symbol that is in a mask layer. But when I try I get a JavaScript console error:

 

TweenLite.min.js:12 Uncaught Cannot tween a null target.

 

My other objects animate fine. I believe I have all the proper .js files loaded in the HTML (easelJS, tweenJS, movieclip, preloadJS) and the Tweenlite files (CSSPlugin, EasePack, Tweenlite). 

 

Here is the code I used that throws the error. 

TweenLite.to(this.leftYellowStripeMask, .5, {y:-9, ease:Quad.easeOut, delay:.3});

I'm guessing masks are not supported this way?

 

Thanks,

 

Link to comment
Share on other sites

No, and a new error message:

 

Uncaught TypeError: Cannot set property 'y' of undefined.

 

It doesn't seem to recognize the movieclip instance. The movieclip holds a vector shape, which is the mask. This is a file that I converted from Flash AS3/Greensock to a HTML5 Canvas doc, if that matters.

Link to comment
Share on other sites

Thanks, that's very helpful and leaves us with 2 options. Either you don't have an object called leftYellowStripeMask or EaselJS doesn't let you target that object.

 

If you can't set the y of an object directly, neither can TweenLite.

From what I recall animated mask supported is limited with EaselJS.

I don't think masks get treated like MovieClips or display objects once they are exported. The CreateJS team would be able to give you a better answer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...