Skip navigation
Currently Being Moderated

Full Screen Problem

Aug 30, 2012 7:14 AM

I'm having trouble, I want my animation to be able to go full screen, but it doesn't seem to be working. I don't know if the problem is in the actionscript or html. Thanks for any help

 

 

 

FullScreenBut.addEventListener(MouseEvent.CLICK, goFullScreen);

 

function goFullScreen(event:MouseEvent):void

{

    setFullScreen();

}

 

function setFullScreen():void

{

    if (stage.displayState== "normal")

    {

        stage.displayState="fullScreen";

        stage.scaleMode = StageScaleMode.NO_SCALE;

    }

    else

    {

        stage.displayState="normal";

    }

}

 

 

///////HTML/////////

 

<body>

        <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="200">

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

                <param name="quality" value="high" />

                <param name="wmode" value="opaque" />

                <param name="swfversion" value="15.0.0.0" />

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

<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->

                <param name="expressinstall" value="Scripts/expressInstall.swf" />

<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

<!--[if !IE]>-->

                <object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="1920" height="1080">

<!--<![endif]-->

                        <param name="quality" value="high" />

                        <param name="wmode" value="opaque" />

                        <param name="swfversion" value="15.0.0.0" />

                        <param name="expressinstall" value="Scripts/expressInstall.swf" />

<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

                        <div>

                                <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

                                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

                        </div>

<!--[if !IE]>-->

                </object>

<!--<![endif]-->

        </object>

        <script type="text/javascript">swfobject.registerObject("FlashID");</script>

</body>

 
Replies
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 8:26 AM   in reply to John Delamotte

    try:

     

     

    ///////HTML/////////

     

    <body>

            <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="200">

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

                    <param name="quality" value="high" />

                    <param name="wmode" value="opaque" />

                    <param name="swfversion" value="15.0.0.0" />

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

    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->

                    <param name="expressinstall" value="Scripts/expressInstall.swf" />

    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

    <!--[if !IE]>-->

                    <object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="1920" height="1080">

    <!--<![endif]-->

                            <param name="quality" value="high" />

                            <param name="wmode" value="opaque" />

                            <param name="swfversion" value="15.0.0.0" />

                            <param name="expressinstall" value="Scripts/expressInstall.swf" />

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

    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

                            <div>

                                    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

                                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

                            </div>

    <!--[if !IE]>-->

                    </object>

    <!--<![endif]-->

            </object>

            <script type="text/javascript">swfobject.registerObject("FlashID");</script>

    </body>

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 1:25 PM   in reply to John Delamotte

    oh wait, that html is totally screwed up and can't possibly be something published by flash.

     

    start over.  open your fla in flash and publish an html (with allow fullscreen selected) and swf.  open the html.

     

    any problems?

     

    if so, copy and paste the html.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 30, 2012 10:36 PM   in reply to John Delamotte

    you're welcome.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 31, 2012 7:45 AM   in reply to John Delamotte

    you can make it look like the stage is 500x281 but you cannot actually change the stage size unless you publish for 100%, use a scalemode of noscale and use javascript to resize the browser window (which you can only do if the window was opened using javascript).

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 31, 2012 9:29 AM   in reply to John Delamotte

    you're welcome.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 12:42 PM   in reply to John Delamotte

    so, you want to start with a 400x200 stage and then make the stage appear to be 500x281 after returning from fullscreen?

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 1:13 PM   in reply to John Delamotte

    when you go fullscreen, your stage should occupy the entire screen (unless you have an flvplayback component somewhere).

     

    does fullscreen look like you expect?

     

    and, copy and paste your the html code you're using to embed your swf.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 2:21 PM   in reply to John Delamotte

    try:

     

     

     

    <div id="flashContent">

                            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="25%" height="25%" id="civilWarEraTest12" align="left">

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

                                    <param name="quality" value="high" />

                                    <param name="bgcolor" value="#ffffff" />

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

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

                                    <param name="wmode" value="window" />

                                    <param name="scale" value="showall" />

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

                                    <param name="devicefont" value="false" />

                                    <param name="salign" value="" />

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

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

                <!--[if !IE]>-->

                                    <object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="25%" height="25%">

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

                                    <param name="quality" value="high" />

                                    <param name="bgcolor" value="#ffffff" />

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

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

                                    <param name="wmode" value="window" />

                                    <param name="scale" value="showall" />

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

                                    <param name="devicefont" value="false" />

                                    <param name="salign" value="" />

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

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

                <!--<![endif]-->

                                    <a href="http://www.adobe.com/go/getflash"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" /></a>

                <!--[if !IE]>-->

                                    </object>

                <!--<![endif]-->

                            </object>

                    </div>

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 4:22 PM   in reply to John Delamotte

    click file>publish settings>html and select flash with fullscreen for your template, size percent and select 25 percent width and 25 percent height and for the bottom 4 comboboxes select default, default, center and center.

     

    if that fails, attach a screen shot of that publish settings panel.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 6:48 AM   in reply to John Delamotte

    that looks good.  now, what is the url to that embedding html?

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 7:18 AM   in reply to John Delamotte

    comment out that scaleMode or change it when returning to normal:

     

    function goFullScreen(event:MouseEvent):void

    {

        setFullScreen();

    }

     

    function setFullScreen():void

    {

        if (stage.displayState== "normal")

        {

            stage.displayState="fullScreen";

            //stage.scaleMode = StageScaleMode.NO_SCALE;

        }

        else

        {

            stage.displayState="normal";

        }

    }

     

    also, change those percents from 25% to 500/1920 x 100% ~= 26%

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 7:49 AM   in reply to John Delamotte

    in your publish settings change 25% to 26%.

     

    the only problem i see at https://dl.dropbox.com/u/72608572/test1.html

     

    is when returning from fullscreen.  that problem is caused by your scalemode.

     

    what problem(s) do you see with test1.html?

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 10:48 AM   in reply to John Delamotte

    copy and paste your goFullScreen function.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 11:32 AM   in reply to John Delamotte

    change that to:

     

     

     

     

    function goFullScreen(event:MouseEvent):void

    {

        setFullScreen();

    }

     

    And the setFullScreen function is:

     

    function setFullScreen():void

    {

        if (stage.displayState== "normal")

        {

            stage.displayState="fullScreen";

        }

        else

        {

            stage.displayState="normal";

        }

    }

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 6:54 PM   in reply to John Delamotte

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points