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

Full Screen... Impossible?

New Here ,
Apr 12, 2012 Apr 12, 2012

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

TOPICS
ActionScript
930
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
Contributor ,
Apr 12, 2012 Apr 12, 2012


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>


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 ,
Apr 12, 2012 Apr 12, 2012

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?

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
Contributor ,
Apr 12, 2012 Apr 12, 2012
LATEST

Yes the code will be on button click.


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