Forum Moderators: open

Message Too Old, No Replies

Flash Wont Run In Firefox using SWFobject

         

slimey

12:08 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



Ive followed the instructions to the letter i have looked at other peoples problems and tried their solutions.

Works perfectly in IE but in firefox it says movie isnt loaded.
ITs driving me crazy!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to Makowski Brown</title>
<script type="text/javascript" src="swfobject.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="menu">
<div id="under">
</div>
</div>
<div id="flashcontent">
<p>I'm sorry, you don't appear to have Macromedia Flash
Player installed. <a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">Go
install it</a> and then return to this site!
</p>
</div>

<script type="text/javascript">
var so = new SWFObject("main.swf", "flashcontent", "779", "431", "6", "#FFFFFF", true);
so.addParam("wmode", "transparent");
so.write("flashcontent");
</script>
<div>
</div>
</div>
<div id="footer">
</div>
</body>
</html>

Anyone got any ideas for me?

oxbaker

5:56 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



the javascript / write flash out hack is ONLY for IE. As firefox isn't under the same patent restrictions or court case. You should probably just add the EMBED tag for the standard firefox flash plugin to your html page. Use the JS workaround for IE, but a standard object embed tag will work the same as always for the other browsers

hth,
mcm

slimey

9:58 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



Ok... ive tried just standard tags and nothing works. The movie wont load in firefox at all... i have all the latest plugins and versions of everything. It also wont work on my brothers computer.

Can someone post a standard object embed tag that is sure to work

oxbaker

5:28 pm on Sep 22, 2006 (gmt 0)

10+ Year Member



just open the .fla and press the publish button. it will create a .html file with a standard object tag (including the EMBED element) with your flash file written in. see if that works.

mcm

Powdork

6:22 am on Sep 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



swf object works perfectly for me in firefox. I've downloaded your code and it works fine for me on firefox too. Are you sure you have javascript enabled on firefox?

jbcurtin

5:31 pm on Sep 25, 2006 (gmt 0)

10+ Year Member



I looked at your code, but with my own .js. The thing that i noticed is that it was all the way at the top. When i added a few enter spaces the .js started playing father down the page.

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

or for something cleaner you can use the <pre> tag.

If you want to continue using java to post your .swf files, this might work. I see you are trying to detect if a person has the flash program that is required to run your .swf. Seeing as how Firefox does this already, I really do not see a reason for it.

I am somewhat new here, and I don't have any commercial sites up, but sometimes a newb opinion works. :)

If your looking for an easier way to put your .swf in a browser, you might want to use this code:


<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="120" height="120" title="wormhole">
<param name="movie" value="wormhole.swf" />
<param name="quality" value="high" />
<embed src="wormhole.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="120" height="120"></embed>
</object>
</body>

It works in Firefox, and IE.
[vsthecoast.com...]

Hope this helps.

This is just a scrap server that I am posting this link to, it has no commercial value.

[edited by: jbcurtin at 5:37 pm (utc) on Sep. 25, 2006]

Powdork

5:35 pm on Sep 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The swfobject method is important in that it replaces the flash with the content that resides in the layer (named flashcontent in this example) for users without flash (most notably search engines).

actually, i think it probably is better to say it replaces the content with the flash than the other way around.