This content has been marked as final. Show 4 replies
You could try manually dispatching a MouseEvent.MOUSE_OVER event from the button. That will likely trigger it. (if not, try MouseEvent.ROLL_OVER).
thanks, yes, that may work....sorry to be a newbie, but can you give me a pointer on how to manually dispatch an event?
It's easy. Just do something like:
That simulates the event of a user passing their mouse over the button.
thanks for the help.
It turns out that MOUSE_OVER didn't work, because the button is a child and this started an infinite loop. I thought setting bubble to false would fix it but no luck.
Using ROLL_OVER worked though. I also hadd to add a MOUSE_OUT handler. So it ended up looking like this:
private function nodeMouseOverHandler (event:MouseEvent):void
var result:Boolean = addButton.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OVER, false));
private function nodeMouseOutHandler (event:MouseEvent):void
var result:Boolean = addButton.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT, false));