Solved

Embed Flash Object in HTML correctly

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

773 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