I have made a website and works perfectly in IE but when I check it in firefox its totally wrong. In more detail:

<object height="100%" width="100%" name="SWF" id="SWF"  
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">
 <param name="movie" value="test.swf />
 <param name="quality" value="high" />
 <embed src="test.swf" quality="high" width="" height="" name="home"
 pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>

The result being that in IE it expands full screen but in firefox it is small like 200x100.

So any ideas why? and solutions?

Thankyou, Regards X

Dani AI

Generated

noted the problem was resolved but did not post the fix; pointed in the right direction. Two more things to check when Flash appears full-size in IE but tiny in Firefox: Firefox uses the <embed> fallback and will give the plugin a default small size (often 200x100) if the embed element has no explicit dimensions, and malformed HTML (for example an unclosed quote in a <param> value) can cause browsers to parse the object/embed differently.

Practical steps that reliably fix this across browsers:

  • Give both the object and the embed explicit size values (or ensure their parent container has a computed size).
  • If using percentage heights, make the page/container heights explicit with CSS so 100% can be calculated.
  • Watch for HTML errors (missing quotes, stray characters) that some engines forgive and others do not.

Example CSS to make a full-viewport Flash container:

html, body, #flashContainer {
  height: 100%;
  margin: 0;
}
#flashContainer object, #flashContainer embed {
  width: 100%;
  height: 100%;
  display: block;
}

For robust, cross-browser embedding consider a library like SWFObject (SWFObject on GitHub). Note that Flash reached end-of-life in 2020; see Adobe's notice (Adobe Flash Player end-of-life) and plan migration to HTML5/JS where possible.

Recommended Answers

All 2 Replies

Member Avatar for Member #114696

Well, don't keep height and width attribute empty. It will surely result into undefined behavior.

I figured it out. Thanks anyways. Regards, X

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.