Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: open

Message Too Old, No Replies

Having trouble with the swfobject.js script

Can't get it to show my flash file

     

WilMoya

8:12 pm on Aug 8, 2006 (gmt 0)

10+ Year Member



I've tried several things. Everything seems ok, but when I apply the script to the page, the Flash file doesn't show. When I remove the script, everything's OK. I would appreciate tips on any errors in my code. Here's a sample:

<!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=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="swfobject.js"></script>
<meta name="robots" content="noindex,nofollow" />
</head>

<body>
<div id="flashcontent">
This is the text behind the movie.</div>

<script type="text/javascript">
var fo = new SWFObject("swf/banner1.swf", "banner1", "420", "147", "6", "#FFFFFF");
fo.addVariable("variable", "varvalue");
fo.write("flashcontent");
</script>

</body>
</html>

Thanks,
Wil Moya

[edited by: WilMoya at 8:25 pm (utc) on Aug. 8, 2006]

dareRock

3:27 am on Aug 15, 2006 (gmt 0)

10+ Year Member



change 'banner1' in your SWFObject constructor to 'flashcontent'