Hey Guys,
I thought I'd try out this forum since it is more dedicated to Flash than my other forum. Basically, I have a button that when moused over it makes rivers go to 50% opacity (they start at 10%), then when clicked they go to 100%.
What I WANT:
Then the rivers stay at 100% until the user clicks the button again.
What is HAPPENING:
Currently though the mouseout is fading the rivers back to 10%. I know that my code is telling it to do that and want to know how to make it stop.
Here is my code for this:
Code:
PS. If anyone has a quick way for doing the event listeners as I have 9 more buttons that have to do this same thing - that would be great.Code:function shipMouseOver(event:MouseEvent):void { Tweener.addTween(rivers_mc, {alpha: 1, time:2}); Tweener.addTween(this.dashboard_mc.ship_btn, {alpha: 1, time:2}); } function shipMouseOut(event:MouseEvent):void { Tweener.addTween(rivers_mc, {alpha: .1, time:2}); Tweener.addTween(this.dashboard_mc.ship_btn, {alpha: .5, time:2}); } function shipClick(event:MouseEvent):void { if(shipState == "on") { shipState = "off"; Tweener.addTween(rivers_mc, {alpha: .10, time:2}); } else { shipState = "on"; Tweener.addTween(rivers_mc, {alpha: 1, time:2}); } }
--
Greg




Reply With Quote
