Jump to content
Search Community

conflicting rollovers !!!!

anarchy test
Moderator Tag

Recommended Posts

i am having a massive issue with GS which i cant figure out for the life of me why it is happening

 

Basically i am telling a button that once click - to move itself to a x/y position.

It also has rollover/outs

 

But once it gets clicked the mc moves slightly and then stops - so it doesnt complete its animation.

It looks like theres some sort of confliction between the rollovers and on onReleases

 

anyone come across this problem?

Link to comment
Share on other sites

Yep, I noticed several issues:

 

1) Your onRollOver uses autoAlpha to fade the object out and toggle _visible to false, but when _visible is false, that triggers an onRollOut which starts fading in which toggles _visible back to true which triggers an onRollOver, etc. You've got an endless loop going. Just use _alpha instead of autoAlpha in this case to avoid the nasty loop.

 

2) As indicated in the docs, TweenLite will always overwrite all tweens of the same object when a new one is created by default. You have an onRelease that moves your button but also an onRollOut that spawns another tween of the same object which overwrites that onRelease one. You can use OverwriteManager to set the overwrite mode to AUTO - see http://blog.greensock.com/overwritemanager/

 

3) You're using a stale version of the tweening engine (v10 or before). I'd highly recommend upgrading when you have a chance. Note that you'll need to change your import statements and activate the AutoAlphaPlugin. But there are a ton of enhancements in v11 that are probably worth the upgrade price (free) ;)http://blog.greensock.com/v11/

 

Hope that helps.

Link to comment
Share on other sites

thanks GS

 

i havent tried this yet but made a fair bit of sense so will do it tomorrow and let u know how i get on.

As you can see i've only just started using AS to an intermediate level and although i think GS is amazing i still have sooooo much to learn just in terms of AS2. but hopefully if i can catch on well i will be in a position to upgrade (maybe even to premium) and take full avantage

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