var so = new SWFObject("/modules/carbon/CarbonFlash.swf?fileName=/modules/carbon/mannequin_list.php", "CarbonFlash", "100%", "100%", "8", "#cccccc","high"); so.addVariable("allowScriptAccess", "sameDomain"); so.write("carbon_app");
// ]]> </script>
--The above code get's an error in firefox that 'var n' is not defined - that's in the function so.write(). Using the source(uncompressed) version works fine.
======function in swfobject_source.js============ write: function(elementId){ if(this.getAttribute('useExpressInstall')) { // check to see if we need to do an express install var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]); if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) { this.setAttribute('doExpressInstall', true); this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl'))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){ var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; n.innerHTML = this.getSWFHTML(); return true; }else{ if(this.getAttribute('redirectUrl') != "") { document.location.replace(this.getAttribute('redirectUrl')); } } return false; } ====================================== The line that causes the error is this... var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; - it's in bold above.
var n should be true/false but the error says it's not defined - this must be a bug with the compressor their using.
I have tested the below with Firefox and the compress 1.5 js, and it gets no errors. Try this simple test case, then re-introduce you css classes etc. Notice the addPram rather than addVariable, and removeal of "high" as that is the default value set by swfObject anyhow.