Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
rudal

TweenMax width-height fail on Animate CC

Go to solution Solved by Carl,

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 post
Share on other sites

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 post
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.

×