Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 747
  • Last Modified:

Embed Flash Object in HTML correctly

Hi all,

I am embedding a flash file (.swf) into an HTML page using:

<<table width="100%" height="100%" border="1">
    <tr style="height:100%">
          <td width="100%">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="450" height="300">
<param name="movie" value="homepage_animations.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent" />
<param name="menu" value="false" />
<param name="scale" value="exactfit" />

<embed src="homepage_animations.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="300"></embed>
</object>

          </td>
     </tr>
</table>


2 problems:

1 - When I load the page, there is a "frame" around the flash object and I have to click on the flash object first (which sets it in focus), and then I can click on the elements inside the flash file). This means that the user is clicking an extra time for nothing and there is an annoying border that flickers. How do i get rid of this "frame"?

2 - I'm trying to size the flash file according to how much space there is on the page... eg: width=100% and height=100%. When I change the width and height specifications to 100%, the flash file disappears. I need to make the flash file "scale" properly, for example: the user can resize the browser window and the flash file inside the webpage expands and shrinks.

Any ideas?

Regards,
Dave
0
Dangeriz
Asked:
Dangeriz
  • 2
  • 2
1 Solution
 
shuboarderCommented:
Hi Dangeriz,

The grey border issue is an Internet Explorer Windows only issue. Basically, because of the EOLAS lawsuit against Microsoft, Microsoft now requires the user to activate any external plug-in content. However, it's very simple to get around. Simply "write" the Flash object/embed tags with JavaScript. Most professionals prefer to use Geoff Stearn's SWFObject script, which can be downloaded at his site:

http://blog.deconcept.com/swfobject


Hope this helps!
0
 
DangerizAuthor Commented:
Hi shuboarder,

Thanks for the link, it explains everything quite well and I'm already using the SQFObject script.

There's only one thing I'm still not sure about, can you not "stretch" a swf file? The "Full Screen" version example in that article above basically stretches the swf background to fill the HTML but you can see the objects on the swf file are still the same size. Can't you stretch and shrink the swf file according to the HTML space?

Thanks,
Dave
0
 
shuboarderCommented:
Hi,

yes if you want to stretch the swf to fill the html space, you need to set it as a percentage of the space.
i.e. set the dimensions in Publish Settings on the html tab to 100%
0
 
DangerizAuthor Commented:
Hi, sorry for the late response...

Where can you find this "Publish Settings" on the "html" tab?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now