Solved

Embed Flash Object in HTML correctly

Posted on 2006-11-23
6
739 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SVG Star 4 35
Synchronizing CSS load 3 29
Where can i store images and reference them in small html newsletters, signatures etc 4 49
Basic JavaScript Question 3 38
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now