Is there any way to simulate a click event in AS3? I'm trying this:
element.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_DOWN, true, false));
But click event isn't trigger it.
If you are listening for MouseEvent.CLICK
then dispatch MouseEvent.CLICK
. You are now dispatching MouseEvent.MOUSE_DOWN
element.dispatchEvent(new MouseEvent(MouseEvent.CLICK));