/ Published in: JavaScript

Javascript solution for embedding Flash in HTML
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Embed the Proxy SWF inside the div. The Proxy SWF is key to the approach as JS does not provide * a mechanism to communicate with 2 documents originating from different domains. **/ function embedFlash() { var url = "SWFProxy.swf"; var xiSwfUrlStr = "playerProductInstall.swf"; var flashvars = {}; var params = {}; params.allowscriptaccess = "always"; var attributes = {}; attributes.id = "proxySWF"; attributes.name = "proxySWF"; attributes.align = "middle"; swfobject.embedSWF( url, "flashContainer", "100%", "100%", "10.0.0", xiSwfUrlStr, flashvars, params, attributes); }
URL: http://code.google.com/p/swfobject/
Comments
