Never mind. I seem to have sorted it.
Created a custom preloader and listened for ADDED_TO_STAGE.
In the handler:
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, true );
Then in the onInitCompleteHandler();
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, true );
This function clearly needs a fence
private function stageEventHandler(event:Event):void
if (event.target is Stage)
Can you elaborate on what you did with a custom preloader to eliminate the problem? Did you cancel the event?
This is a new problem with 3.4.1
Yep. Its a bug with 3.4. (Ironically I updated from 3.3 to duck another bug, but so it goes). Actually, I never fully solved it as far as I remember. It still seemed to pop up once in awhile, though I think I minimised it a lot.
In the Preloader I listened to Event.ADDED_TO_STAGE, then in the handler:
stage.mouseEnabled = false; // Throws RTE saying stage Stage doesn't impliment this property.
graphics.drawRect(0,0, 1000, 1000); // Could be more accurate but this was fine for me.
mouseEnabled = false;
- Basically drew a shield in the preloader to bounce away mouse interaction and prevent MouseEvents reaching the stage (And causing the error).
Like I said. Seeemed to help, but never resolved it fully. TBH it was right at the end of a project which has since passed through QA, so must have been very intermittant.
Let me know if the above helps & if you find a better solution.