How can I disable full screen functionality in swf using as3
Copy link to clipboard
Copied
I have created an application in which i need to input text .
But if i run the swf in full screen mode it disable s the input typing functionality.
Is there any way so that i can disable the fullscreen functionality when i press ctrl+F or change it to normal mode even if I press ctrl+F.
Any suggestion would be grateful.
Thanks..
Copy link to clipboard
Copied
stage.displayState = StageDisplayState.NORMAL;
use the above command
Copy link to clipboard
Copied
I have used stage.displayState = StageDisplayState.NORMAL; when the user inputs some text.
But it gives jerk when the screen is already in the fullscreen mode and it suddenly comes to normal mode.
So give sme idea how I can disable the fullscreen functionality in
swf so that it always stays in normal mode even if I press ctrl+F.
Thanks.
Copy link to clipboard
Copied
There is allowFullScreen parameter for Flash object/embed HTML that you can set to false. But can't you just not to set the stage displayState to fullScreen? You are making it fullscreen explicitly with your code in the first place.
--
Kenneth Kawamoto
Copy link to clipboard
Copied
allowFullScreen command is used in html page.
I don't have problem with browser for fullscreen .I just want to disable it when we run the swf alone.
Since if any one presses the Ctrl+f it will become fullscreen atomatically though its in normal mode .
So I need to disable it .
Copy link to clipboard
Copied
I don't know why you let your users run your SWF in the stand alone player, but try:
stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullscreen);
function fullscreen(e:FullScreenEvent):void {
if(e.fullScreen) stage.displayState = StageDisplayState.NORMAL;
}
--
Kenneth Kawamoto
Copy link to clipboard
Copied
Thanks,we cannot do fullscreen by pressing Ctrl+F now.
But it gives a jerk.As it come back from fullscreen to normal mode.
Can it be avoided?
Copy link to clipboard
Copied
In theory you can trap keys with fscommand("trapallkeys", "true") but this doesn't appear to trap the fullscreen keys. If you are distributing your movie as a stand alone can you consider AIR or 3rd party projectors? If so you can prevent fullscreen without these hacks.
--
Kenneth Kawamoto

