Solved

Embed Flash Object in HTML correctly

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

758 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

21 Experts available now in Live!

Get 1:1 Help Now