Hi,
I have a button that has skins:
<mx:Button id="myButton"...overSkin="@Embed(source='media/over.jpg')"...
This works fine and I get the image display on mouse over. Now I would
like the same visual effect using dispatch event. So I have registered
a handler through an addEventListener call:
myButton.addEventListener(MouseEvent.MOUSE_OVER, handler_mouseOver);
and have the handler:
private function handler_mouseOver(e:MouseEvent):void{
trace(">>>>>>>>>> handler_mouseOver");
}
and I use dispatch event to simulate the mouse over:
myButton.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
this all works great....except that what I was wanting was the visual
effect the overSkin provides upon mouse over and it is not happening.
Notice I effectively have nothing in the handler - just a trace -
thinking that the visual effect came with the dispatchEvent being
fired. - obviously I was wrong here. Any suggestions on how to get the
"overSkin" visual effect programmatically? Thanks,
Dan