Jump to content

Flash Embed HTML not working in IE


Sarah82

Recommended Posts

Hey guysWondered if you could help me?I have this code<object width="550" height="400" param name="wmode" value="transparent"><param name="movie" value="gallery.swf"><embed src="Images/Gallery/gallery.swf" wmode="transparent" width="550" height="400"></embed></object>and I have tested the file and it works in Firefox and Safari but not in IE can anyone shed some light as to why?CheersSarah

Link to comment
Share on other sites

you don't include param 'param name="wmode" value="transparent"' in the opening object tag. A typical setup usually looks like this

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-44455350000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="550" height="400" id="myMovieName"><param name="movie" value="Images/Gallery/gallery.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF"><param name="wmode" value="transparent"><embed src="Images/Gallery/gallery.swf" quality="high" bgcolor="#FFFFFF" width="550" height="400" name="gallery" align="" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed></object>

Link to comment
Share on other sites

Ah right thanks...Still not working in IE though.Could it have something to do with the ActiveX Control???? I keep getting the banner asking me to allow blocked content and when I allow it does not load.

Link to comment
Share on other sites

most flash are run using javascript, which avoids having the user click the flash content before it will start.google swfobject its a javascript file, in which you supply information about the flash file, and a link to the swfobject.js file and it does the rest, without the annoying banner in IE popping up every time.

Link to comment
Share on other sites

most flash are run using javascript, which avoids having the user click the flash content before it will start.google swfobject its a javascript file, in which you supply information about the flash file, and a link to the swfobject.js file and it does the rest, without the annoying banner in IE popping up every time.
Cool thanks I will give that a bash!Is javascript hard to learn? Looks like I may have to get to grips with it :)
Link to comment
Share on other sites

Err, you don't need to, you just tell the JS script what the name of your Flash file is.

Link to comment
Share on other sites

In the head <head>...</head> add link to swobject.js<script type="text/javascript" src="swfobject.js"></script>In the body <body>..</body>you create a container that youwish to place the swf file in, with alternative text which will show ifflash file does not load.<div id="flashcontent"> This text is replaced by the Flash movie.</div>below this, add information about your swf file<script type="text/javascript"> var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699"); so.write("flashcontent");</script>required arguments:

  • swf – The file path and name to your swf file.
  • id – The ID of your object or embed tag. The embed tag will also have this value set as it's name attribute for files that take advantage of swliveconnect.
  • width – The width of your Flash movie.
  • height – The height of your Flash movie.
  • version – The required player version for your Flash content. This can be a string in the format of 'majorVersion.minorVersion.revision'. An example would be: "6.0.65". Or you can just require the major version, such as "6".
  • background-color – This is the hex value of the background color of your Flash movie.

Link to comment
Share on other sites

Ok think I am being really stupid here....<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Future Limo Buses</title><script type="text/javascript" src="swfobject.js">var so = new SWFObject("Images/Gallery/gallery.swf", "gallery", "400", "200", "8", "#336699");so.write("gallery.swf");</script><style type="text/css"><!--body { font-family:Verdana, Geneva, sans-serif; border:none; background-color:#000;}#PageInfo { border:none; text-align:center; height:350px; width:550px; margin-top:30px; margin-left:30px;}--></style></head> <body> <div id="PageInfo"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="gallery.swf"> <param name="movie" value="Images/Gallery/gallery.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <embed src="gallery.swf" quality="high" width="550" height="400" name="gallery" align="middle" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" wmode="transparent"> </embed> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="gallery.swf" width="550" height="400"> <!--<![endif]--> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> </body></html>is the code, what am I doing wrong?Sorry if this is a really stupid issue :s

Link to comment
Share on other sites

is the code, what am I doing wrong?
Everything!<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Future Limo Buses</title><script type="text/javascript" src="swfobject.js"></script>var so = new SWFObject("Images/Gallery/gallery.swf", "gallery", "400", "200", "8", "#336699");so.write("gallery.swf");</script><style type="text/css"><!--body {font-family:Verdana, Geneva, sans-serif;border:none;background-color:#000;}#PageInfo {border:none;text-align:center;height:350px;width:550px;margin-top:30px;margin-left:30px;}--></style></head><body><div id="PageInfo"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="gallery.swf"><param name="movie" value="Images/Gallery/gallery.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="gallery.swf" quality="high" width="550" height="400" name="gallery" align="middle" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed><!--[if !IE]>--><object type="application/x-shockwave-flash" data="gallery.swf" width="550" height="400"><!--<![endif]--><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a><!--[if !IE]>--></object><!--<![endif]--></object></div><script type="text/javascript"><!--//var so = new SWFObject("Images/Gallery/gallery.swf", "gallery", "400", "200", "8", "#336699");so.write("PageInfo");//--></script></body></html>the <object> is no longer required, but you could keep it in so if javascript is disabled it would use object instead, but you still have ie pop-up problem
Link to comment
Share on other sites

Are you storing the HTML pages on your own computer? IE has stricter restrictions on content retrieved locally than that served over HTTP.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...