Jump to content

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

TweenLite.to Doesn't Work Right

Recommended Posts


This works:


timeline = new TimelineMax({onComplete:NextSlide()});

timeline.append(TweenLite.to(parent_container, 1, {x:130}) );


but this doesn't:


TweenLite.to(parent_container, 1, {x:130, onComplete:NextSlide()});


The latter doesn't slide to the new position, it just suddenly arrives. (The code in between repositions the container. Again, the first example works.) Why doesn't the second example work?



Link to comment
Share on other sites

hi beno,


this could be a simple syntax error. when using onComplete:someFunction... never put the () parenthesis after the function name.



TweenLite.to(parent_container, 1, {x:130, onComplete:NextSlide});



TweenLite.to(parent_container, 1, {x:130, onComplete:NextSlide()});

Link to comment
Share on other sites

Thank you. I have made that mistake before, and making that edit did clear up the problem. However, it returned when I took out the following code (which has nothing to do with GS, but I was told to take it out on the Adobe Flash list to get rid of a problem with "blinking" images):


i = 0;

while (i != parent_container.numChildren)




if (parent_container.parent)



parent_container = null;

parent_container = new MovieClip();




Again, nothing to do with this forum, but I'd love to know where the glitch really is!!



Link to comment
Share on other sites

Beno, I don't really understand what you're asking here.


It would be best if you kept questions in the GreenSock forums focused on GreenSock tools. There are great general forums at actionscript.org and kirupa.com.

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.