2 Replies Latest reply on Apr 11, 2011 7:40 AM by Suoevolat

    How to automatically load/open a .swf file as full screen




      I create a .swf file and wanted it to load/open automatically as a full screen.  I tried the following code but it only works with projector or .exe files. Curently user has to press F11 to open or close as a full screen.  Here is my code:


      fscommand("fullscreen", "true");


      Any recommendations?





        • 1. Re: How to automatically load/open a .swf file as full screen
          adninjastrator Level 4

          If this is opening in a Web browser have you looked into Flash "scaling"?


          Here are examples of different scaling parameters available in the Publish settings. You can also add these parameters directly in the html (<param name="scale" value="noscale"). All the examples replace the actual Flash dimensions with 100% for both width and height (width="100%" height="100%"). These examples use the old <object> and <embed> to illustrate the different ways to scale Flash. Once you understand how it works I’d recommend that you use swfobject to place the Flash in your final project.

          View the source code for each page to see the full code.




          "exactFit" scales the file to fit exactly within the confines of the screen, irregardless if the movie becomes consequently distorted. The original aspect ratio is not maintained. So round things are not round and squares are not square.




          "noScale" is the default setting, and causes the movie to be displayed at the originally designed dimensions.



          "noBorder" causes the movie to be scaled to what ever dimensions are needed to have no border surrounding the movie within the player, which consequently could result in some of the movie being cut off from view. In other words, the movie will maintain the original aspect ratio and will fill the screen completely. But if the movie has to be streched wider to fill both sides of the screen, it will also stretch taller, but then some of the top and the bottom of the movie may be cut off from view.




          "showAll" scales the movie to the size of the screen (which could cause pixelation if the file contains raster information), the difference between showAll and exactFit is that showAll mantains initial movie size proportions. Because it maintains the original aspect ratio, there can be space to the sides or the top and bottom. But everything always shows and they are not distorted. But notice the photo in the center, it becomes pixilated at larger screen resolutions.

          The trickiest part of trying to go full screen is that it’s difficult to make the Flash wider without making it taller also, that is, to maintain the correct proportions or aspect ratio of everything on the stage. These methods are just simple scaling accomplished with html. There are also methods to dynamically scale the stage and it’s elements using Actionscript… but that’s a much more complex undertaking.

          Best wishes,

          Eye for Video




          Best wishes,


          1 person found this helpful
          • 2. Re: How to automatically load/open a .swf file as full screen
            Suoevolat Level 1

            Hi adninjastrator and thanks for your response.


            My HTML Publish settings is already set at the "Show All" (my default) and although there is space to the left and right everything shows fine.  Its just that when I pressed F11 the video fill the screen completely and proportionately - all headers disappear until F11 is pressed again.  I definitely want to avoid any distortions in height or width and don't want any parts of the moving cut off. 


            Just wondering if there was AC3 code that replaced F11 that when the movie fill the screen automatically yet proportionately.


            Thanks for your help.