Jump to content
Search Community

killing TimelineMax tweens on RollOver/Out [SOLVED]

delizade test
Moderator Tag

Recommended Posts

hi,

I have a problem with timelineMax.

I used timelineMax for Rollover and Rollout events. but some weird behaviors happened. I have timelineMax blog which is made by "insertMultiple" which is contain "allTo" TweenMax method. And I quickly trigger over and out from object, tweens is not killed. I can't show a sample now when I struggling a work but if you can write down some rules and tips it will be appreciated.

 

the case is actually like that :

 

1- there is an object which has rollOver and RollOut TimelineMax tweens. instertMultiple is used and that contains "allTo" method like this insertMultiple([TweenMax.allTo([_nk_mc,_title_mc]...,

2- I tried to quickly trigger to over and out events. When one event is triggered, I could not achive to kill other's timeline tweens.

 

I used every method seperately or togather like ;

timeline.kill() or timeline.stop () and after that timeline.killTweensOf(mc1,mc2,mc3...

 

best regards

Link to comment
Share on other sites

There's an error in your code:

 

tl.appendMultiple([TweenMax.allTo([_mc2,_mc3], .4, {alpha:0, delay:.5, onUpdate:test, ease:Expo.easeOut}), new TweenMax(_mc4, .6, {y:200, delay:.5, ease:Expo.easeOut})]);

 

Remember, TweenMax.allTo() returns an ARRAY, so you're nesting an array within an array - the timeline chokes on this line because it's expecting an array containing all TweenLite/Max/TimelineLite/Max instances (any of those). You're feeding it one array and one TweenMax. See what I mean? You could do this instead:

 

var tweens:Array = TweenMax.allTo([_mc2,_mc3], .4, {alpha:0, delay:.5, onUpdate:test, ease:Expo.easeOut});
tweens.push(new TweenMax(_mc4, .6, {y:200, delay:.5, ease:Expo.easeOut}));
tl.appendMultiple(tweens);

  • Like 1
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...