Jump to content
GreenSock

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

values as strings no longer working?

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

i've noticed that after switching to v12 or the minified versions of TweenMax, the tweens using values as strings no long work properly.

 

for example:

TweenMax.from(copy1b, 1.5, {alpha:0, y:"30", ease:Strong.easeOut, delay:3});

 

works great in v11, but tweens from the top of the canvas in v12 / minified. anyone else experiencing this? on closer look, the y tweens break completely, while the x tweens seem to work ok, but the values are interpreted differently from v11. for example:

 

TweenMax.from(copy2a, 1, {x:"920", delay:1.5});

 

the object does not appear prior to tweening on my 1000px wide canvas, yet in v12 / minified appears about 100px or so on the canvas before tweening.

 

 

sorry if this has been discussed, i searched the forum but found nothing. also, i'm new to GSAP for javascript.

Link to comment
Share on other sites

I'm really curious to see an example of this - would you be able to post a very simple file that demonstrates the issue? I can't imagine why the tweens would simply break (especially for y but not x)

 

Keep in mind that if you're trying to define a relative tween (instead of an absolute value), v12 requires that you prepend "+=" or "-=", like x:"+=920". There's an explanation about why on the main v12 page: http://www.greensock.com/v12/

Link to comment
Share on other sites

thanks for the quick response. you're right...the "+=" syntax fixed the y issue, i didn't notice that in the documentation. for comparison, i've posted a v11 / v12 example. i left the old y syntax in there to show how the tweening is different between the two. thanks.

 

http://moondogstudios.com/tweenTest/infographic_v11.html

 

http://moondogstudios.com/tweenTest/infographic_v12.html

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