Relevant things:
- I had fullscreen code working before I did a security update on the flash player.
- Nevertheless, I still can fullscreen Youtube right now
- I'm doing the fullscreen activation in response to user clicks (therefore no security is blocking it AFAIK)
- stage.displayState is null all the time, in the main timeline and even after assignments below.
Relevant code:
1) Set on the main timeline:
stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.align = StageAlign.RIGHT;
2) Set when a user clicks the fullscreen button:
import flash.display.*;
import flash.events.*;
/* ... */
this.addEventListener(MouseEvent.CLICK,modoFullScreen);
/* ... */
private function modoFullScreen(e:MouseEvent): void {
try {
stage.displayState = StageDisplayState.FULL_SCREEN;
}
catch (e:SecurityError) {
trace(e.toString());
}
}
3) Set when a user clicks the normal screen button:
/* Similar as above, but then I set */
stage.displayState = StageDisplayState.NORMAL