Jump to content


TimelineLite "reversed" property problems...[SOLVED]

Recommended Posts

Hi guys, I'm having trouble to understand the "reversed" property in timelinelite... I am setting a timeline in a class that plays or reverses on a rollover/rollout. On one of my tweenlite inside the timelinelite I have a onComplete call to a function so the function is fired at the rigth moment. What I don't understand is that timeline.reversed always returns false since my function always does the same thing (if/else). Another thing might be that the function isn't called when the timelinelite is playing backward?


here is some skimmed code so you see what might be my problem:


var timeline:TimelineLite = new TimelineLite();

//lots of other TweenLite
timeline.insert(TweenLite.to(m1b_mc.texte_mc, .5, {colorTransform:{tint:0xFDFDFD}, onComplete:textCol}),.5);
//lots of other TweenLite

private function textCol()
if (timeline.reversed == false)
	m1h_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE;
	m1m_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE;
	m1b_mc.texte_mc.titre_mc.titre_txt.textColor = 0x56AAFE;
	m1h_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E;
	m1m_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E;
	m1b_mc.texte_mc.titre_mc.titre_txt.textColor = 0x7E7E7E;


Everything works great except this. It turns my text to 0x56AAFE at the right moment on the first rollOver but it stays this color when I rollOut... The timeline reverses correctly though. I have a rollover on the movie that calls timeline.play() and on rollOut it calls timeline.reverse().


Any ideas? Thanks

Link to comment
Share on other sites

Hum it seems that the problem is that the function isn't called when the timeline is going backwards... Is there a way to call it even if it is on reverse?


Thanks for your help

Link to comment
Share on other sites

Hi and thanks for your answer,


yes I tried it but the problem is that the function needs to be called during the reverse of the timeline and not on complete... That is why I'm calling the function in a tweenlite onComplete which is inside the timeline. It does great when the timeline is going forward and it calls the function at the right moment but I would need it to call it again at the same time while it is going backwards, after reverse() has been called.


I tested it with a trace() and the function isn't being called on reverse. Is it supposed to be so?, I mean the tween does happen and does complete even on reverse. I've seen addCallBack from timelineMax, I would really like to stick with timelineLite but would it solve my problem?



Link to comment
Share on other sites

I solved my problem by reserching more... :oops: (it was well hidden thought) :)


I just did set immediateRender:false in a separate tween at the exact time I wanted it (1 sec)


like this:

timeline.insert(TweenLite.to(m1b_mc, 0, {onComplete:textCol, immediateRender:false}), 1);


thanks for such a great engine!

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.