FullScreen OnMouseMove Bug
Here’s an interesting fact: Going to FullScreen mode causes Flash to temporarily stop executing all onMouseMove events.
I’m sure if someone from Adobe was pressed hard enough they might be able to provide some convoluted ~logical~ reasons why going into full-screen mode stops all onMouseMove events but I’m not buying it. I wasted a few frustrating hours figuring this out and when I searched the web to confirm my suspicions I found no mention of this “feature” so I’m calling it what it is, a BUG.
Here, take a look at this ugly SWF (move your mouse around to draw a line whenever the OnMouseMove event is fired and then press the blue square to toggle fullScreen mode). All mouseEvents are halted until the “Press Esc to exit full screen mode” message fades out.
This is all of the code used to create the above SWF:
//
function toggleFullScreen(){
if(Stage["displayState"] == "fullScreen"){
Stage["displayState"] = "normal";
}else{
Stage["displayState"] = "fullScreen";
}
}
//
//
createEmptyMovieClip("Box", 10);
with(Box){
beginFill(0x4080AA);
lineTo(50, 0);
lineTo(50, 50);
lineTo(0, 50);
lineTo(0, 0);
}
Box.onPress = toggleFullScreen;
//
//
lineStyle(0);
onMouseMove = function (){
lineTo(_xmouse, _ymouse);
}
//
//
If you think you know why Flash temporarily halts onMouseMove events while displaying the “Press Esc” message I’d love to hear it. Until Adobe fixes this you should use an OnEnterFrame event or SetInterval to get around this particular bug when going full-screen in Flash.
I forgot to note it here: Bug report @ adobe.
https://bugs.adobe.com/jira/browse/FP-5276
It could be that the layer the “Press ESC” msg is attached to has some kind of default code which disables the mouse. There should be some way to change this default setting…
Just a thought…
I agree that its a bug. Don’t see why adobe would stall “onMouseMove” and not “onEnterFrame”.
For me it does not work even after “Press ESC” faded away.
I need to return to “windowed” mode to get it back.
PixelWit,
Worked fine here, except for the popup message (press esc to exit full screen mode); while that was visible the SWF wouldn’t draw the line.
Hi Brandon. That’s the point. The onMouseMove event should fire every time the mouse moves, even when the “Pres Esc” message is displayed. If onMouseMove isn’t fired every time the mouse moves then it’s not “fine”, it’s broken. 😉
Hey, Pixelwit.
It is a nuisance, no doubt about it. It could, though, have been done by design to call full attention to the message, you know, to avoid/reduce chances of having the less computer savvy of us scream “Flash trapped me! I had to restart my computer to get out of it!” …that kind of stuff. I’m just guessing and playing devil’s advocate here is all. XD
Yes. Very annoying. I had to work around it with an onEnterFrame.
I got the same issue on my sites, for example on http://alexgphoto.info
When you go FullScreen the mouse events are not propagated. It is made in AS3.0
I saw sites that works fine in fullscreen.
So, does anybody know what is the mistake?
It didn’t worked for me until the “Press Esc to exit full screen” message faded out, but… the mouse cursor remained as a hand, not an arrow. And when I exited fullScreen, it still remained a hand.
The way I avoided that happening on my fullscreen button was by using “onRelease” and “onReleaseOutside” instead of the preferable “onPress”.
@Alex T., I use AS2 because that’s what my clients need. No, I haven’t tried this in AS3, does it work? If so, there’s still no excuse for this not to work in AS2.
@Larsen, did it work while the “Press Esc to exit full screen” message was visible?
This actually worked for me in full screen mode.
Did you try that in AS 3.0? For that matter, why are you still using AS2?