2
votes

I've built an intro page for my website (it's a .swf file) and I'm trying to embed it into an .html file, but the html code won't allow me to resize the file (I want the file to take up the whole page, so I tried resetting the height and width parts of the object tag to 100% - it didn't work) someone told me that the best way to resize the file would be by using javascript. How would I do this?

the code is as follows:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="intro to elianas website" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="intro.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#1C140D" />
<embed src="intro.swf" quality="high" bgcolor="#1C140D" width="100%" height="100%" name="intro" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
4
Your title is misleading - Starx

4 Answers

3
votes

You also need to provide the height and width for the Object as well.

<object width="100%" height="100%">
    <param name="movie" value="file.swf">
    ..
    <embed src="intro.swf" width="100%" height="100%" />
</object>
2
votes

Seems like an inactive post but just in case someone looking for a solution stumbles upon this, here is the solution:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
    codebase="http://download.macromedia.com/pub/shockwave/
    cabs/flash/swflash.cab#version=6,0,40,0" 
    width=100% height=100% id="intro"> 

  <param name="movie" value="sample.swf" /> 

  <param name="quality" value="high" /> 

  <param name="bgcolor" value="#1C140D" /> 

  <embed src="/path/to/sample.swf" quality="high" bgcolor="#1C140D"
      width=100% height=100% name="intro" align="" 
      type="application/x-shockwave-flash" 
      pluginspage="http://www.macromedia.com/go/getflashplayer"> 
  </embed> 

</object>

Note:

  1. Don't define the width and height parameters in double quotes (when using %)
  2. This technique will not work for XHTML, <embed> can't be within <object> tag
0
votes

Here is a short and to the point tut about embedding swf in html:

http://www.tizag.com/flashTutorial/flashhtmlcode.php

0
votes

Use CSS to increase the page width and height of your body and html tags

<style type="text/css">
html,body {
    height:100%;
    width:100%;
}

body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
</style>

I had a similar issue with a full page flash file, where firefox wouldn't display the flash and chrome displayed it with a limited height towards the top of the page.