Skip navigation
TobinShields
Currently Being Moderated

Full Screen... Impossible?

Apr 12, 2012 11:07 PM

Tags: #help #flash #swf #button #buttons #actionscript #fullscreen #2.0

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

 
Replies
  • Currently Being Moderated
    Apr 12, 2012 11:25 PM   in reply to TobinShields


    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>


     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2012 11:38 PM   in reply to TobinShields

    Yes the code will be on button click.

     


     
    |
    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