Your code appears to be mixing both static and dynamic embed methods for the
same element, which is likely to be problematic.
You first make a call in your script code to "embedSWF(...)" and specify a
DOM element of "myAlternativeContent".
Then, down in your markup, I see a <div id="myAlternativeContent"> which is
good. But then inside it you have the <object> stuff as the static embedding
syntax.
Either empty out that <div> and use dynamic embedding, or change your calls
from "embedSWF(...)" to proper static embed calls to "registerObject(...)".
Also, it'll be easier for us to debug further issues if you provide a link
to a page we can live test instead of just looking at source code you paste
into the thread.
--Kyle
--------------------------------------------------
From: "Matt Bury" <[email protected]>
Sent: Sunday, January 10, 2010 3:14 PM
To: "SWFObject" <[email protected]>
Subject: SWFObject 2.0 works but 2.2 doesn't in Firefox
Hi,
I'm developing a plugin module for an open source PHP learning
management system (Moodle) that leverages the JW FLV Player from
LongtailVideo.com. Previous versions have worked without any problems
with various versions of the player across IE, Chrome, Safari and
Firefox.
I've updated the SWFObject version from 2.0 to 2.2 and I've come
across this problem (SWFObject 2.2 doesn't work in Firefox 3.5).
Everthing is fine in all other browsers and I've tried switching
between SWFObject embed and "alternativeContent" embed which is just
bog standard HTML code. The alternative content, which is not
dependent on SWFObject, works.
Like I've said, everything works fine with SWFObject 2.0 and it's only
when I try 2.2 that things go wrong, so I tried opening the example
files that come in the swfobject.zip download package - index.html and
index_dynamic.html (both of which are dependent on SWFObject) - and
neither of them display the test.swf file in Firefox! Again, no
problems with the other browsers.
Is this a Firefox or a SWFObject bug? Does anyone know?
In case you're interested, here's an instance of the code my module
prints out:
<!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" dir="ltr" lang="en"
xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<link rel="stylesheet" type="text/css" href="http://localhost/moodle19/
theme/standard/styles.php" />
<link rel="stylesheet" type="text/css" href="http://localhost/moodle19/
theme/standardwhite/styles.php" />
<script type="text/javascript" src="http://localhost/moodle19/mod/flv/
swfobject/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.abouttext = "";
flashvars.aboutlink = "http://www.longtailvideo.com/players/";
flashvars.author = "";
flashvars.autostart = "false";
flashvars.backcolor = "ffffff";
flashvars.bufferlength = "1";
flashvars.captions = "http://localhost/moodle19/file.php/13/xml/
trafalgar_festival_2008_2.xml";
flashvars.client = "";
flashvars.controlbar = "bottom";
flashvars.description = "";
flashvars.date = "";
flashvars.displayclick = "play";
flashvars.file = "http://localhost/moodle19/file.php/13/flv/
trafalgar_festival_2008.flv";
flashvars.frontcolor = "666666";
flashvars.icons = "true";
flashvars.id = "";
flashvars.item = "";
flashvars.lightcolor = "";
flashvars.mute = "false";
flashvars.playlist = "none";
flashvars.playlistsize = "180";
flashvars.plugins = "captions";
flashvars.quality = "true";
flashvars.repeat = "none";
flashvars.resizing = "true";
flashvars.screencolor = "";
flashvars.shuffle = "false";
flashvars.start = "0";
flashvars.state = "";
flashvars.streamer = "";
flashvars.stretching = "uniform";
flashvars.tags = "";
flashvars.title = "";
flashvars.tracecall = "";
flashvars.type = "video";
flashvars.version = "5.0";
flashvars.volume = "90";
var params = {};
params.play = "true";
params.loop = "true";
params.menu = "true";
params.quality = "best";
params.scale = "noscale";
params.salign = "tl";
params.wmode = "opaque";
params.bgcolor = "";
params.devicefont = "true";
params.seamlesstabbing = "true";
params.allowfullscreen = "true";
params.allowscriptaccess = "always";
params.allownetworking = "all";
var attributes = {};
attributes.align = "middle";
swfobject.embedSWF("http://localhost/moodle19/mod/flv/jw/
player.swf", "myAlternativeContent", "900", "480", "9.0.115", "http://
localhost/moodle19/mod/flv/swfobject/expressInstall.swf", flashvars,
params, attributes);
</script>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="http://localhost/
moodle19/theme/standard/styles_ie7.css" />
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="http://localhost/
moodle19/theme/standard/styles_ie6.css" />
<![endif]-->
<meta name="keywords" content="moodle, Development: Timed Text
Captions - Trafalgar Square Video " />
<title>Development: Timed Text Captions - Trafalgar Square Video</
title>
<link rel="shortcut icon" href="http://localhost/moodle19/theme/
standardwhite/favicon.ico" />
<!--<style type="text/css">/*<![CDATA[*/ body{behavior:url(http://
localhost/moodle19/lib/csshover.htc);} /*]]>*/</style>-->
<script type="text/javascript" src="http://localhost/moodle19/lib/
javascript-static.js"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
javascript-mod.php"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
overlib/overlib.js"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
overlib/overlib_cssstyle.js"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
cookies.js"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
ufo.js"></script>
<script type="text/javascript" src="http://localhost/moodle19/lib/
dropdown.js"></script>
<script type="text/javascript" defer="defer">
//<![CDATA[
setTimeout('fix_column_widths()', 20);
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function openpopup(url, name, options, fullscreen) {
var fullurl = "http://localhost/moodle19" + url;
var windowobj = window.open(fullurl, name, options);
if (!windowobj) {
return true;
}
if (fullscreen) {
windowobj.moveTo(0, 0);
windowobj.resizeTo(screen.availWidth, screen.availHeight);
}
windowobj.focus();
return false;
}
function uncheckall() {
var inputs = document.getElementsByTagName('input');
for(var i = 0; i < inputs.length; i++) {
inputs[i].checked = false;
}
}
function checkall() {
var inputs = document.getElementsByTagName('input');
for(var i = 0; i < inputs.length; i++) {
inputs[i].checked = true;
}
}
function inserttext(text) {
text = ' ' + text + ' ';
if ( opener.document.forms['theform'].message.createTextRange &&
opener.document.forms['theform'].message.caretPos) {
var caretPos = opener.document.forms['theform'].message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) ==
' ' ? text + ' ' : text;
} else {
opener.document.forms['theform'].message.value += text;
}
opener.document.forms['theform'].message.focus();
}
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (strTagName == "*" && oElm.all)? oElm.all :
oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; i<oClassNames.length; i++){
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames
[i].replace(/\-/g, "\\-") + "(\\s|$)"));
}
}
else{
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/
\-/g, "\\-") + "(\\s|$)"));
}
var oElement;
var bMatchesAll;
for(var j=0; j<arrElements.length; j++){
oElement = arrElements[j];
bMatchesAll = true;
for(var k=0; k<arrRegExpClassNames.length; k++){
if(!arrRegExpClassNames[k].test(oElement.className)){
bMatchesAll = false;
break;
}
}
if(bMatchesAll){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
//]]>
</script>
</head>
<body class="mod-flv course-13 dir-ltr lang-en_utf8" id="mod-flv-
view">
<div id="page">
<div id="header" class=" clearfix"> <h1
class="headermain">Development </h1>
<div class="headermenu"><div class="navigation">
<ul><li>
<a title="All logs" onclick="this.target='_top';" href="http://
localhost/moodle19/course/report/log/index.php?
chooselog=1&user=0&date=0&id=13&modid=100"><img
class="icon log" src="http://localhost/moodle19/pix/i/log.gif"
alt="All logs" /></a>
</li><li><form action="http://localhost/moodle19/mod/flv/view.php"
onclick="this.target='_top';"><fieldset
class="invisiblefieldset"><input type="hidden" name="id" value="99" /
<button type="submit" title="Previous activity"><span class="arrow
">◄</span><span class="accesshide " > Previous activity</
span></button></fieldset></form></li><li><form action="http://
localhost/moodle19/course/jumpto.php" method="get" id="navmenupopup"
class="popupform"><div><select id="navmenupopup_jump" name="jump"
onchange="self.location=document.getElementById
('navmenupopup').jump.options[document.getElementById
('navmenupopup').jump.selectedIndex].value;">
<option value="http://localhost/moodle19/mod/forum/view.php?id=55"
style="background-image: url(http://localhost/moodle19/mod/forum/
icon.gif);">News forum</option>
<optgroup label="Title "> <option value="http://localhost/
moodle19/mod/chat/view.php?id=67" style="background-image: url(http://
localhost/moodle19/mod/chat/icon.gif);">Chat</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=69"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">XML experiments</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=70"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">3D Desert scene</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=71"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">AMF experiments</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=72"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">FlashVars experiments</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=73"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">Gradebook experiments</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=74"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">FlashVars word search test</option>
<option value="http://localhost/moodle19/mod/choice/view.php?id=75"
style="background-image: url(http://localhost/moodle19/mod/choice/
icon.gif);">Choice experiments</option>
<option value="http://localhost/moodle19/mod/quiz/view.php?id=76"
style="background-image: url(http://localhost/moodle19/mod/quiz/
icon.gif);">Quiz - ordering</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=92"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">Grade book framework experiments</option>
<option value="http://localhost/moodle19/mod/skype/view.php?id=94"
style="background-image: url(http://localhost/moodle19/mod/skype/
icon.gif);">Skype Activity</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=95"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">Another gradebook instance to play with</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=96"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">The third entry in the grade items table</option>
<option value="http://localhost/moodle19/mod/swf/view.php?id=97"
style="background-image: url(http://localhost/moodle19/mod/swf/
icon.gif);">Instance Example</option>
</optgroup> <optgroup label="Topic 2"> <option value="http://
localhost/moodle19/mod/flv/view.php?id=98" style="background-image: url
(http://localhost/moodle19/mod/flv/icon.gif);">FLV Player experiments</
option>
<option value="http://localhost/moodle19/mod/flv/view.php?id=99"
style="background-image: url(http://localhost/moodle19/mod/flv/
icon.gif);">Timed Text Captioning Experiments</option>
<option value="http://localhost/moodle19/mod/flv/view.php?id=100"
selected="selected" style="background-image: url(http://localhost/
moodle19/mod/flv/icon.gif);">Jump to...</option>
<option value="http://localhost/moodle19/mod/flv/view.php?id=101"
style="background-image: url(http://localhost/moodle19/mod/flv/
icon.gif);">More captions...</option>
<option value="http://localhost/moodle19/mod/flv/view.php?id=102"
style="background-image: url(http://localhost/moodle19/mod/flv/
icon.gif);">No extra parameters</option>
</optgroup></select><input type="hidden" name="sesskey"
value="cC9Z7Fr3Zi" /><div id="noscriptnavmenupopup" style="display:
inline;"><input type="submit" value="Go" /></div><script type="text/
javascript">
//<![CDATA[
document.getElementById("noscriptnavmenupopup").style.display =
"none";
//]]>
</script></div></form></li><li><form action="http://localhost/moodle19/
mod/flv/view.php" onclick="this.target='_top';"><fieldset
class="invisiblefieldset"><input type="hidden" name="id" value="101" /
<button type="submit" title="Next activity"><span class="accesshide "
Next activity </span><span class="arrow ">►</span></
button></fieldset></form></li></ul>
</div></div>
</div> <div class="navbar clearfix">
<div class="breadcrumb"><h2 class="accesshide " >You are here</
h2> <ul>
<li class="first"><a onclick="this.target='_top'" href="http://
localhost/moodle19/">matbury.com - 1.9</a></li><li> <span
class="accesshide " >/ </span><span class="arrow sep">►</
span> <a onclick="this.target='_top'" href="http://localhost/moodle19/
course/view.php?id=13">Development</a></li><li> <span
class="accesshide " >/ </span><span class="arrow sep">►</
span> FLV Player: Timed Text Captions - Trafalgar Square Video</li></
ul></div>
<div class="navbutton"><form method="get" action="http://
localhost/moodle19/course/mod.php" onsubmit="this.target='_top';
return true"><div><input type="hidden" name="update" value="100" /
<input type="hidden" name="return" value="true" /><input
type="hidden" name="sesskey" value="cC9Z7Fr3Zi" /><input type="submit"
value="Update this FLV Player" /></div></form></div>
</div>
<!-- END OF HEADER -->
<div id="content" class=" clearfix"><div align="center">
<div id="myAlternativeContent">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="900" height="480" id="myFlashContent" align="middle">
<param name="movie" value="jw/player.swf" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="scale" value="noscale" />
<param name="salign" value="tl" />
<param name="wmode" value="opaque" />
<param name="bgcolor" value="" />
<param name="devicefont" value="true" />
<param name="seamlesstabbing" value="true" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="sameDomain" />
<param name="allownetworking" value="all" />
<param name="flashvars"
value="&abouttext=&aboutlink=http://www.longtailvideo.com/
players/
&author=&autostart=false&backcolor=ffffff&bufferlength=1&captions=http://
localhost/moodle19/file.php/13/xml/
trafalgar_festival_2008_2.xml&client=&controlbar=bottom&date=&description=&displayclick=play&file=http://
localhost/moodle19/file.php/13/flv/
trafalgar_festival_2008.flv&frontcolor=666666&icons=true&id=&item=&lightcolor=&mute=false&playlist=none&playlistsize=180&plugins=captions&quality=true&repeat=none&resizing=true&screencolor=&shuffle=false&start=0&state=&streamer=&stretching=uniform&tags=&title=&tracecall=&type=video&version=5.0&volume=90"
/
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="jw/player.swf"
width="900" height="480" align="middle">
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="scale" value="noscale" />
<param name="salign" value="tl" />
<param name="wmode" value="opaque" />
<param name="bgcolor" value="" />
<param name="devicefont" value="true" />
<param name="seamlesstabbing" value="true" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="sameDomain" />
<param name="allownetworking" value="all" />
<param name="flashvars"
value="&abouttext=&aboutlink=http://www.longtailvideo.com/
players/
&author=&autostart=false&backcolor=ffffff&bufferlength=1&captions=http://
localhost/moodle19/file.php/13/xml/
trafalgar_festival_2008_2.xml&client=&controlbar=bottom&date=&description=&displayclick=play&file=http://
localhost/moodle19/file.php/13/flv/
trafalgar_festival_2008.flv&frontcolor=666666&icons=true&id=&item=&lightcolor=&mute=false&playlist=none&playlistsize=180&plugins=captions&quality=true&repeat=none&resizing=true&screencolor=&shuffle=false&start=0&state=&streamer=&stretching=uniform&tags=&title=&tracecall=&type=video&version=5.0&volume=90"
/
<!--<![endif]-->
<div align="center">
<p><strong><a href="http://longtailvideo.com/"
target="_blank">JW FLV Player 5.0</a> requires <a href="http://
www.adobe.com/products/flashplayer/">Flash Player 9.0.115</a> or above
--
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.