/ Published in: JavaScript
Shows how to use an array to embed swf objects with swfobject.js. This allows for multiple embeds (synced ad's etc.)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- load swfobject to load flash --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script type="text/javascript"> var swfs = [ { url: 'tbd_msn_hpto_fullpage.swf', id: 'tbd_msn_hpto_fullpage', width: 100, height: 100, flashvars: {}, params: { wmode: 'transparent' }, attributes: {} } ]; for (var i = 0; i < swfs.length; i++) { var swf = swfs[i]; swfobject.embedSWF( swf.url, swf.id, swf.width, swf.height, "9.0.0", false, swf.flashvars, swf.params, swf.attributes ); }; </script>