Posted By

kif on 09/24/06


Tagged

flash


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Add Flash


 / Published in: JavaScript
 

Add Flash Object

  1. function addFlashObj(node, swf) {
  2. var o = document.createElement('object');
  3. node.appendChild(o);
  4. var p = document.createElement('param');
  5. p.setAttribute('name', 'movie');
  6. p.setAttribute('value', swf);
  7. o.appendChild(p);
  8. o.setAttribute('data', swf);
  9. o.setAttribute('type', 'application/x-shockwave-flash');
  10. }
  11.  
  12. addFlashObj(document.body, 'sample.swf');

Report this snippet  

You need to login to post a comment.