Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-26-2009, 08:55 PM   #1
PhotoChick
Clueless
 
Join Date: Jul 2009
Location: The Beach
Posts: 18
Default Selected Button States

So I am switching everything over to AS3 from AS2 (finally) and I am stuck with the selected state (when using ROLL_OVER and ROLL_OUT).

I did a search and have found a ton of examples for using the timeline and labels to tween the menu states... however I haven't been able to find anything in regards to using a tween engine.

I can currently tween the selected state by just doing:

ActionScript Code:
addEventListener(MouseEvent.MOUSE_DOWN, onClick); //with the function: function onClick(event:MouseEvent):void {   if (event.target == btn1) { TweenMax.to(btn1, 0.5, {tint:0x0099CC});            TweenMax.to(btn2, 0.5, {tint:0x000000});                 TweenMax.to(btn3, 0.5, {tint:0x000000});          }     if (event.target == btn2) { TweenMax.to(btn2, 0.5, {tint:0x0099CC});            TweenMax.to(btn1, 0.5, {tint:0x000000});                 TweenMax.to(btn3, 0.5, {tint:0x000000}); }   if (event.target == btn3) { TweenMax.to(btn3, 0.5, {tint:0x0099CC});            TweenMax.to(btn1, 0.5, {tint:0x000000});                 TweenMax.to(btn2, 0.5, {tint:0x000000});   } }

However that is without any ROLL_OVER or ROLL_OUT states. Every time that I add those it disables the selected button state. Is there a better way to manage button states in AS3 when using a Tweening Engine to change the tints, positions, etc?
PhotoChick is offline   Reply With Quote
Old 10-26-2009, 08:57 PM   #2
ASWC
Super Moderator
 
ASWC's Avatar
 
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528
Default

try with MOUSE_OVER, MOUSE_OUT instead
__________________
aswebcreations
Super Duper!
ASWC is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:21 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.