Skip to main content
August 17, 2009
Question

fullscreen mode error message

  • August 17, 2009
  • 1 reply
  • 1001 views

I have the following to open my file in full screen mode, but am getting the error message below.

logo.addEventListener(MouseEvent.CLICK, fullScreenMode);

function fullScreenMode(e:MouseEvent):void

{

     stage.displayState = StageDisplayState.FULL_SCREEN;

}

When I click in my swf, nothing happens. When I click in the html, I get this error:

SecurityError: Error #2152: Full screen mode is not allowed.

at flash.display::Stage/set displayState()

at main_fla::MainTimeline/fullScreenMode()[main_fla.MainTimeline::frame1:71]

Why is this wrong?

In my html I have this param:

<param name="allowScriptAccess" value="sameDomain" />

<param name="allowFullScreen" value="true" />

<param name="movie" value="main.swf" />

This topic has been closed for replies.

1 reply

webqaflash
Inspiring
August 18, 2009

When testing in the flash environment the fullscreen functionality will not work.

And when embedding the movie , make suere that both in param and embed tags fullscreen mode is enabled.

August 18, 2009

That might be the issue. Here is what I have, not sure what I am missing, I am using swfObject

<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1024" height="744">
     <param name="allowScriptAccess" value="sameDomain" />
         <param name="allowFullScreen" value="true" />
        <param name="wmode" value="window" />
        <param name="movie" value="main.swf" />
        <!--[if !IE]>-->
     <object type="application/x-shockwave-flash" data="main.swf" width="1024" height="744">
     <!--<![endif]-->
     <div>
          <h1>You don't have the right Flash player installed.</h1>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
     </div>
     <!--[if !IE]>-->
     </object>
     <!--<![endif]-->

</object>