At fist glance would say it's expecting a closing </embed> tag, but that's still invalid code (embed nested in object and embed is deprecated.) 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.
|