Forum Moderators: open
what do i need to do to get this to work?
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" width="184px" height="99px" id="InsertWidget_38be7006-abd0-49d2-98a3-626b2ff615d3" align="middle">
<param name="movie" value="http://example.com/syndication/flash/wrapper/InsertWidget.swf"/>
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="menu" value="false" />
<param name="flashvars" value="r=2&appId=38be7006-abd0-49d2-98a3-626b2ff615d3" />
<param name="allowScriptAccess" value="sameDomain" /> <br>
<embed src="http://example.com/syndication/flash/wrapper/InsertWidget.swf" name="InsertWidget_38be7006-abd0-49d2-98a3-626b2ff615d3" width="184px" height="99px" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" align="middle" allowScriptAccess="sameDomain" flashvars="r=2&appId=38be7006-abd0-49d2-98a3-626b2ff615d3" />
</object> [edited by: eelixduppy at 12:31 am (utc) on Dec. 13, 2008]
Try this. Download and place a copy of SWFobject [blog.deconcept.com] in the directory. No edits or changes, just include it as below.
Head of document (or external JS for the second block of Javascript:)
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var myFlash = new swfobject('http://example.com/syndication/flash/wrapper/InsertWidget.swf',
'InsertWidget_38be7006-abd0-49d2-98a3-626b2ff615d3', '184', '99', '9', '#ffffff');
// Quality determined by the "9" above
myFlash.addParam("wmode", "transparent");
myFlash.addParam("menu", "false");
myFlash.addParam("allowScriptAccess","SameDomain");
myFlash.addVariable("flashvars", "r=2&appId=38be7006-abd0-49d2-98a3-626b2ff615d3");
window.onload = function() {
if (document.getElementById('my-fla-div')) {
myFlash.write('my-fla-div');
}
};
</script>
In document where you want it to display:
<div id="my-fla-div"><img src="screen-capture-of-widget.jpg"></div>
1. Initially an image loads when page loads, in case Flash is not present.
2. If Flash plugin is present, JS writes flash to div.
Be sure "flashvars" is the variable expected by the flash object. If it's not, change "addVariable" to this:
myFlash.addVariable("r", "2");
myFlash.addVariable("appId","38be7006-abd0-49d2-98a3-626b2ff615d3");
You may have to fiddle with it a bit, but this is a very reliable cross browser approach.