3 Replies Latest reply: Apr 12, 2012 11:38 PM by Bharat Patel RSS

    Full Screen... Impossible?

    TobinShields

      Hello all,

       

      I am very new to Flash, but very excited to learn!

       

      Right now, I am working on a very simple project  that is 600x400px with some shapes and buttons on the stage. However, I wanted to know if there was a way that I could include a button that (when clicked) would make the .swf file go into a fullscreen mode, and also keep everything on my stage in scale and not distort everything.. (Think of a Youtube video going fullscreen). Then having another button appear to make it a small screen again.

       

      I have had a very hard time searching for the answer, because there is so much to do with the flash player and making it full screen--but that mainly had to do with movies.

       

      I should also say, that I am not planning to put this on a website; but that it would be acessed by just a computer. (It's a educational jepordy game that I am making for teacher). So I am not sure if that would make a difference in the answer.

       

      Thanks guys,

      Tobin

        • 1. Re: Full Screen... Impossible?
          Bharat Patel Community Member


          Full-screen can be toggled on or off using the Stage class. To go to full-screen mode in Action Script 2, use:

           

               Stage.displayState="fullScreen";

           

          To go back to window mode

           

               Stage.displayState="normal";

           

          And you have to set value in the swf embedding object as shown below:

          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

             codebase="http://.../swflash.cab#version=9,0,0,0"

             width="550" height="400" id="sample" align="middle">     

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

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

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

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

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

             <embed src="sample.swf" quality="high" bgcolor="#333333"

          width="550" height="400"

          name="sample" align="middle"

          allowscriptaccess="sameDomain"

          type="application/x-shockwave-flash"

            allowFullScreen="true"

          pluginspage="http://www.macromedia.com/go/getflashplayer" />

            </embed>

          </object>


          • 2. Re: Full Screen... Impossible?
            TobinShields Community Member

            Thanks for your quick reply!

             

            I have seen this answer (or an answer like it) to other people's questions. However, I am not planning to put this on a website--so would the embedding code be placed somewhere else?

             

            Also, where would the Stage.displayState="fullScreen"; code go? On a button?

            • 3. Re: Full Screen... Impossible?
              Bharat Patel Community Member

              Yes the code will be on button click.