Solved

Embed Flash Object in HTML correctly

Posted on 2006-11-23
6
742 Views
Last Modified: 2008-01-09
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
Comment
Question by:Dangeriz
  • 2
  • 2
6 Comments
 
LVL 21

Accepted Solution

by:
shuboarder earned 200 total points
ID: 18003127
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
 
LVL 4

Author Comment

by:Dangeriz
ID: 18003505
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
 
LVL 21

Expert Comment

by:shuboarder
ID: 18003605
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
 
LVL 4

Author Comment

by:Dangeriz
ID: 18027063
Hi, sorry for the late response...

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question