2 Replies Latest reply on Apr 28, 2009 8:28 AM by wurdup

    help when viewing swf webpage in browser

    wurdup Level 1

      When I load a swf it works well and the document size is correct but when viewed from a browser online it displays the whole project even the objects tha are suppose to be out of view off the page. How can I limit the browser to the document page size?

        • 1. Re: help when viewing swf webpage in browser
          antonmills.

          Hi wurdup,

          I'm guessing that your probably loading the swf file directly in the browser. In this case the browser runs the swf at whatever dimensions the browsers currently at, hence being able to see items off the Flash stage.


          You will need to create yourself a simple HTML page and embed the swf at the resolution you want it to be viewed at.


          Something like:

           

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
              <head>
                  <title>this is my HTML page</title>
                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

              </head>
              <body>
                  <div id="flashContent">   

                         <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="550" HEIGHT="400" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=9,0,0,0">
                              <PARAM NAME="MOVIE" VALUE="myMovie.swf">
                              <PARAM NAME="PLAY" VALUE="true">
                              <PARAM NAME="LOOP" VALUE="true">
                              <PARAM NAME="QUALITY" VALUE="high">
                              <PARAM NAME="SCALE" value="noborder">
                              <EMBED SRC="myMovie.swf WIDTH="550"
                                   HEIGHT="400"
                                   PLAY="true"
                                   LOOP="true"
                                   QUALITY="high"
                                   scale="noborder"
                                   PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
                             </EMBED>
                         </OBJECT>

                  </div>
              </body>
          </html>

           

          You can read more about this at Adobes kb article:

          http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_4150

           

          Alternatively you could look at SWFObject as a versatile method of embedding the swf in to a HTML page:

          http://code.google.com/p/swfobject/wiki/documentation

           

           

          Hope this answers your questions,

          antonmills.

          1 person found this helpful
          • 2. Re: help when viewing swf webpage in browser
            wurdup Level 1

            thanks for your rely. My .swf url had to be submitted for coursework and thought I would be marked down. If it's not possible to do this then that's ok as long as my html works which it does.