clamp
clamp

Reputation: 34006

flash/html, how to embed a flash movie so that it scales with the browser window

i would like to show my flash movie in a browser window so that it fills width and height as good as possible without distorting the movie.

when i use the width and height attribute to the object/embed tags it only scales the width but not the height.

  <body bgcolor="#000000" 
        width="100%"
        height="100%">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
            codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"            
            width="100%"
            height="100%"
            align=""
            id="slot">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="true" />
        <param name="movie" value="..." />
        <param name="quality" value="high" />
        <param name="width" value="100%" />
        <param name="height" value="100%" />
        <embed src="..."
            width="100%" height="100%" quality="high" align="middle" allowScriptAccess="always" allowFullScreen="true" wmode="opaque" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
  </body>

Upvotes: 0

Views: 444

Answers (3)

Chris Burt-Brown
Chris Burt-Brown

Reputation: 2727

I think you just need to add some CSS to the HTML page:

html, body { height: 100% }

Upvotes: 1

graham
graham

Reputation: 946

Use swffit. It resizes flash when the browser window is changed.

Upvotes: 0

Karl Johan
Karl Johan

Reputation: 4022

It should work is youset the width and height to 100%. Then set the scalemode to showAll, that should prevent the movie from distorting.

Then you could of course set the css padding and margin of the html body to 0px the get the most area of the window.

Upvotes: 0

Related Questions