Jump to content
Search Community

TweenMax delay problem

failure13 test
Moderator Tag

Recommended Posts

I always got this exact kind of trouble with tweenMax, when i use delay...So i wanna know why, and how to prevent it.

Here is simple example, it's easy to understand what is going on in there, and what i want to see...

http://www.sendspace.com/file/qackjr

 

Question is, why on just doing simple roll-overs roll-outs i can get locked result like this?

http://s1.ipicture.ru/uploads/20120731/WAE3DsP6.png

 

Surely i miss something!

Link to comment
Share on other sites

Hi can you please zip your files and attach them to this post.

sendspace looks a bit too sketchy for my tastes, they make you wait until the download begins and those sites often try to trick you into installing something.

 

Please zip and attach the files here ("more reply options") or use a more reliable sharing site like http://ge.tt/

 

thanks

Link to comment
Share on other sites

yeah perhaps sendspace is legit, but all the ads scream "download" and it can appear very deceptive.

 

thank you for moving the file to ge.tt. I was able to download it just fine. I feel like a turkey, but right now I only have Flash CS4 running and couldn't open the fla. If you can't save down to CS4 perhaps you can post the code that is giving you trouble. I'm sorry for the inconvenience. I would really like to help you.

 

-c

Link to comment
Share on other sites

I see the problem...

 

Your TweenMax.allTo() calls are simply creating sequenced 0.5-second tweens whose start times are offset by 0.2 seconds. You're flip-flopping the order too on rollover/rollout. So let's say you rollover and it creates a tween for obj2 that will start in 0.2 second to tween alpha to 0, but then you rollout right away which creates a tween for obj2 tweening alpha to 1 and that tween starts right away. Think about how you've scheduled things at this point - the rollout tween is playing FIRST, then 0.2 seconds later the rollover tween starts and tweens the alpha to 0. Therefore, alpha ends up at 0 instead of 1.

 

TweenMax is doing exactly what it is supposed to do. It's just a logic issue with the flow of your code.

 

The solution is simple: set overwrite:true on your tweens so that they immediately kill any preexisting tweens of the same object.

 

Make sense now?

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