Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Having trouble with the swfobject.js script

Can't get it to show my flash file

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

New User

10+ Year Member

joined:July 21, 2003
votes: 0

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">
<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" />

<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");


Wil Moya

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

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

Junior Member

10+ Year Member

joined:July 31, 2005
votes: 0

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