Jump to content
Search Community

TweenLight - Using "-=50px" as a value for left property

Lucir
Moderator Tag

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

Posted

Hi, everyone

I'm new here and also new to Geensock. I'm trying to learn TweenLight and SplitText. I was trying to create a text that displays a fraction with a horizontal bar. My question relates to TweenLight using values like "+=50" or "-=50" to move an array of words to the right. I used the following statement:

 

var i;

 for(i = 7; i <= 12; i++){
        TweenLight.to(wordsA, 1, {left:"-=50px"});
        
    }
 
I used the code pen http://codepen.io/anon/pen/zxbzZB
 
If its not possible to use "-=50px",  how would I retrieve the current position(left) of the element?

See the Pen zxbzZB by anon (@anon) on CodePen.

Posted

Hi Lucir  :) , Welcome to the GreenSock forums .

 

pls try use " TweenLite " instead of  " TweenLight " // TweenLight is wrong syntax ! ...

  • Like 1
Posted

Thank you, so much Diaco, I'm so embarrassed. Please forgive me. I can go for days making mistakes like these and never notice them. My problem is solved. 

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