Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I disable full screen functionality in swf using as3

New Here ,
Oct 20, 2011 Oct 20, 2011

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..

TOPICS
ActionScript
4.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2011 Oct 20, 2011

stage.displayState = StageDisplayState.NORMAL;

use the above command

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2011 Oct 20, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2011 Oct 20, 2011

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

http://www.materiaprima.co.uk/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2011 Oct 20, 2011

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 .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2011 Oct 21, 2011

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

http://www.materiaprima.co.uk/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2011 Oct 21, 2011

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2011 Oct 21, 2011
LATEST

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

http://www.materiaprima.co.uk/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines