Jump to content
Search Community

TweenMax width-height fail on Animate CC

rudal test
Moderator Tag

Go to solution Solved by Carl,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

hi,

I am trying to tween width and height with TweenMax in Adobe Animate CC:

 

First frame script (in Animate CC):

var root = this;

// TweenMax.to(root.myBox, 1.25, {scaleX:2.0, scaleY:2.0, ease:Elastic.easeOut}); // --> works

// TweenMax.to(root.myBox, 1.25, {width:"500px"}); // --> NOT WORKS 
TweenMax.to(root.myBox, 1.25, {left:"12px"}); // --> ALSO NOT WORKS 


("myBox" is a name of movie clip on stage).

 

Using:

 

Animate CC Version: 15.1.0.210.

TweenMax.min.js Version: 1.19.0 (also tried 1.18.2).

createjs-2015.11.26.min.js.

 

Thanks.

Link to comment
Share on other sites

  • Solution

Hi and welcome to the GreenSock forums,

 

When using Animate CC with HTML5 canvas export you need to keep in mind that you are animating EaselJS objects (not DOM elements with CSS properties) so its important to use the properties and units that EaselJS uses. Docs for DisplayObject: http://createjs.com/docs/easeljs/classes/DisplayObject.html

 

try changing left to x and dropping the 'px' like:

TweenMax.to(root.myBox, 1.25, {x:12});

From what I recall width is not supported with EaselJS, I couldn't find it in the docs.

  • Like 2
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...