Hi everyone, pardon my code but I'm just starting out with these classes and I wanted to get feedback on these button functions.
What I notice is that if I rollover and out too quickly eventually the animation just hangs.
I'm thinking I'm using these wrong and there is a better way to interrupt the animations?
I am still learning so be gentle... thanks guys!
- btw the tint vaules are defined somewhere else in the code.
//button functions for the Click Button
gameResults.clickMeBtn.addEventListener (MouseEvent.ROLL_OVER, rollover, false, 0, true);
gameResults.clickMeBtn.addEventListener (MouseEvent.ROLL_OUT, rollout, false, 0, true);
gameResults.clickMeBtn.buttonMode=true;
function rollover (event:MouseEvent):void {
TweenLite.to(gameResults.clickMeBtn.theBackground, .5, {tint:buttonColor});
TweenLite.to(gameResults.clickMeBtn.theOutline, .5, {tint:bgColor});
}
function rollout (event:MouseEvent):void {
TweenLite.to(gameResults.clickMeBtn.theBackground, .5, {tint:bgColor});
TweenLite.to(gameResults.clickMeBtn.theOutline, .5, {tint:buttonColor});
}