Friday, April 2, 2010

Mimicking mouse move event

Hi,

I'm using flex through a plugin, and not though a browser (like most people do). For some strange reason my flex SWF doesn't receives mouse move events. I can get the mouse move events in the application that contains the SWF, and I can tell the SWF that the events has occured, using the externalInterface API.

Once I received a call that indicates a new mouse position, I want to mimick it as a normal mouse move event. Any ideas on a simple way to do this?

thanks in advance,

Vince

Mimicking mouse move event

If you have the stage coordinates of the mouse, you can get pretty far by calling getObjectsUnderPoint and dispatching a MouseEvent from the last element in the array (converting the stage coordinates to local).

Alex Harui

Flex SDK Developer

Adobe Systems Inc.

Blog: http://blogs.adobe.com/aharui

No comments:

Post a Comment