I am trying to make a hover menu bar.
Below is the code
<mx:MenuBar id="mainMenuBar0" x="5" y="250" width="243" height="40" alpha=".2"
chromeColor="#a8c6ee" cornerRadius="8" buttonMode="true" mouseOut="mainMenuBar_mouseOverHandler(event)" mouseOver="mainMenuBar_mouseOverHandler(event)">
protected function mainMenuBar_mouseOverHandler(event:MouseEvent):void
{
if (event.type == MouseEvent.MOUSE_OVER)
{
event.target.setStyle("alpha", .8);
}
else
{
event.target.setStyle("alpha", .2);
}
}
The problem is, alpha is not changing. Can anyone guide me what to do?
Alpha is not a style it is a property, please try again. event.target.alpha = .8