2 Replies Latest reply on Jul 31, 2009 1:27 PM by SiHoop

    Full screen mode

    SiHoop Level 1

      I'm trying to use use the code below to go full screen. Also, I've added to index.template.html

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

      but the file will not go full screen unless I access the swf file directly.

      Can anyone point me in the rigth direction? Are there other changes that need to be added to the html page?

      Thanks for your time.

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
          <mx:Script>
              <![CDATA[
              import flash.display.StageDisplayState;
              private function toggle():void{
                  if(fs.selected == true){
                      goFullScreen();
                  } else {
                      exitFullScreen();
                  }
              }
              private function goFullScreen():void {
                     stage.displayState = StageDisplayState.FULL_SCREEN;
              }
              private function exitFullScreen():void {
                     stage.displayState = StageDisplayState.NORMAL;
              }
              ]]>
          </mx:Script>

       


          <mx:Panel width="100%" height="100%" title="Very Basic Full Screen Sample"
          layout="absolute">
          <mx:CheckBox label="Full Screen" id="fs" click="toggle()" horizontalCenter="0" verticalCenter="0"/>
          </mx:Panel>
      </mx:Application>

        • 1. Re: Full screen mode
          babo_ya Level 3

          You need to add the following line of code in the index.templete.html.

           

           

          "allowFullScreen", "true",

           

           

          as below.

           

           

           

          if ( hasProductInstall && !hasRequestedVersion ) {

          // DO NOT MODIFY THE FOLLOWING FOUR LINES

          // Location visited after installation is complete if installation is required

          var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";

          var MMredirectURL = window.location;

              document.title = document.title.slice(0, 47) + " - Flash Player Installation";

              var MMdoctitle = document.title;

           

          AC_FL_RunContent(

          "src", "playerProductInstall",

          "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"" ,

          "width", "${width}",

          "height", "${height}",

          "align", "middle",

          "id", "${application}",

          "quality", "high",

          "bgcolor", "${bgcolor}",

          "name", "${application}",

          "allowFullScreen", "true",

          "allowScriptAccess","sameDomain",

          "type", "application/x-shockwave-flash",

          "pluginspage", "http://www.adobe.com/go/getflashplayer"

          );

          } else if (hasRequestedVersion) {

          // if we've detected an acceptable version

          // embed the Flash Content SWF when all tests are passed

          AC_FL_RunContent(

          "src", "${swf}",

          "width", "${width}",

          "height", "${height}",

          "align", "middle",

          "id", "${application}",

          "quality", "high",

          "bgcolor", "${bgcolor}",

          "name", "${application}",

          "allowFullScreen", "true",

          "allowScriptAccess","sameDomain",

          "type", "application/x-shockwave-flash",

          "pluginspage", "http://www.adobe.com/go/getflashplayer"

          );

          1 person found this helpful
          • 2. Re: Full screen mode
            SiHoop Level 1

            Thanks for your answer. For documentation purposes, I want to note that the full screen command:

            stage.displayState=StageDisplayState.FULL_SCREEN;

             

            must be activated by a user's action such as a click.

             

            I found one other change that I had to make to get full screen to work for me.

            I found one other change that I had to make to get full screen to work for me.

            Below are the 4 changes I had to make to index.template.html

             

             

             

             

             

             

             

             

             

            In each of 2 instances of AC_FL_RunContent insert (and be careful with the commas!)

             

             

            "allowFullScreen", "true",

             

             

             

            Under <object classid=... insert

             

             

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

             

             

             

            Under <embed src=... insert

             

             

            allowFullScreen="true"