Jump to content
Search Community

code acting up on ROLL_OVER

timaging test
Moderator Tag

Recommended Posts

Hi,

 

check out this file attached. Roll Over 2008 and 2009. You'll see that the code should be fairly clean (yes, it's longhand, but I need it to be that way so that I can kinda read it :)

 

so, the copy to the right should stay open until you roll over the other button. You can see that I've created roll out tweens and appear to be calling them correctly, but the behavior is erratic.

 

I tried adding an overwrite manager with a value of 5, but that seemed to make it worse.

 

any ideas would be greatly appreciated.

Link to comment
Share on other sites

The way you've engineered things allows for conflicting tweens that overwrite each other. For example, if I roll over 2008, it starts a TimelineLite that has a bunch of alpha tweens fading stuff in. But if I rollover 2009 before those tweens finish, you tell another TimelineLite to start playing also which contains tweens going in the opposite direction in terms of alpha. The tweens get overwritten. You should also be careful about using relative values when engineering things this way - you have y:"4" on all your tweens but if I rollover a button and things start tweening y to increase 4 but before those tweens are done, I rollout and a new set of tweens starts going in a relative direction as well, it's relative to where it's at at that point.

 

This is a bit awkward for me because if I were building it, I'd engineer things completely differently but I don't have time to walk you through all that would entail and I don't want to make you redo all your work. As a stop-gap measure maybe just make sure you stop() the conflicting timelines before you play() the new ones. Like in the rollout, stop() the associated rollover TimelineLite. Also, have you thought about not using TimelineLite instances at all? Those are more for linear animations but you're dealing with dynamic rollovers where you don't know where the values will start each time - you could just create new tweens each time. Just a thought. Again, I wish I had a simple fix for the engineering/logic issues. :(

Link to comment
Share on other sites

no problem. I've come up with a "plan b", and not worries. Just the fact that you reply this quickly makes your product Leaps and Bounds better than anyone else.

 

thanks for getting back so quickly. Even just the little snippets of ideas help greatly-

 

Dave

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