0 Replies - 2923 Views - Last Post: 09 December 2009 - 12:26 PM

#1 xheartonfire43x   User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Flex: Changing a menubaritem text color on rollover

Posted 09 December 2009 - 12:26 PM

I am building a dynamic menubar right now just from a simple arrayCollection, but I eventually am going to make it create it using XML. Anyways the menubar is custom skinned and everything, and I now have one last issue. On rollover of a menubaritem I need the text color to change from white to gray (#A5A5A5 to be exact). So far I have built a function that will figure out whether or not the mouseevent is rollover or rollout, and I can get the selected index... but I don't know where to go from here.

			private function changeColor(event:MenuEvent):void{
				trace(event.index + " " + event.type);
				if(event.type == "itemRollOver"){
					//I just rolled over a link
				}else if(event.type == "itemRollOut"){
					//I just rolled out of a link
	<mx:MenuBar id="menu" width="1000" height="70" dataProvider="{menu_dp}" click="clickHandler(event)" itemRollOver="changeColor(event)" itemRollOut="changeColor(event)" />

Thanks in advance for all the help.

PS to the moderator: can we have a subforum for Flex posts?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1