I need to register mouse movement for a screensaver like feature. The code below works fine but the mouse move event is not triggered when the mouse is over a movieclip that has had an external swf loaded into it with URLRequest. Is there any way around this without modifying the code in the external swf?
stage.addEventListener(MouseEvent.MOUSE_MOVE,function(e){
lastMoveTime=getTimer()
trace(stage.mouseX)
})
UPDATE:
I need interactivity to be retained in both the parent and child swfs.
The child swf is AS2.
Here is the code for loading the AS2 swf:
var sendPane = new Loader();
var url:URLRequest = new URLRequest("info.swf");
sendPane.load(url);
addChild(sendPane);
Instead of listening to MOUSE_MOVE events, you could rewrite your code to use a Timer with a delay of 10msecs and listen to the TIMER event.
In the handler check if the mousepos has changed since last call.
This is not a very nice solution, but the combination of AS3 and AS2 movies makes it necessary.