Jump to content
Search Community

*HELP* TimelineLite problems

avis test
Moderator Tag

Recommended Posts

Why when i declare timeline globaly it doesnt work?

var timeline:TimelineLite = new TimelineLite();

function clickNavItem(e:MouseEvent):void {	
       moveSize=e.currentTarget.navDir;
timeline.append(TweenLite.to(productsHolder, 1,{x:moveSize}));
}

 

When i use just tweenLite.to inside the same function, it works normally. So all the parameters are OK.

Tnx for help!

Link to comment
Share on other sites

Remember, by default, TimelineLite/Max instances begin playing right away. So by the time you append() your tween, the virtual playhead has already long passed the insertion point where the tween is located. You can simply restart() the timeline after inserting your tween or set paused:true when you create the TimelineLite initially and then play() it after inserting your tween. Or gotoAndPlay() at the startTime of your tween. Lots of options :)

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