26 Jan
Posted by: antilopanda19283flash in: Actionscript 3, Experiences
If you try to dispatch a MouseEvent in a dispatchEvent(), you will get an Error that says "cannot convert "click"(or whatever) to flash.events.Event". So here is the trick for that:
movieClipInstanece.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
Tags: Actionscript 3 , MouseEvent, Events, Click, Roll_Over, Roll_Out, Double_Click, dispatchEvent, dispatch, EventListener, AddEventListener
3 Responses
pei
04|Oct|2008 1what a trick! thanks!
Victor
03|Sep|2009 2would little code but packs a lot!
Gravitin Technologies
22|Mar|2010 3Nice idea… Thx…
Leave a reply