我正在尝试制作悬停菜单栏。
下面是代码
<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);
}
}
问题是,alpha 没有改变。谁能指导我该怎么做?