[Javascript] how to dynamically load flash object

suresh kumar asureshkumar_1983 at yahoo.co.in
Tue Nov 14 08:20:30 CST 2006


Hi to all ,
              Any one help me to solve this problem.i want to display the flash(.swf file) using <object> tag dynamically.Right now the flash image  is not getting diplayed but i able to see the background of the swf file.
   
   here is my code.
   
  myspan=document.getElementById('my_span');
  oImga = document.createElement('OBJECT');  // Create dynamically object tag
oImga.setAttribute('TYPE' , "application/x-shockwave-flash");
oImga.setAttribute('WIDTH' , "600");
oImga.setAttribute('HEIGHT' , "600");
oImga.setAttribute('id',"oI"); // Give id to it
prm=document.createElement('PARAM');  // Create dynamically object tag
prm.setAttribute('NAME' , "MOVIE");
prm.setAttribute('VALUE' , "2.swf");  //source file
oImga.appendChild(prm);
myspan.appendChild(oImga);
   
   
  //display area to display flash file
  <div id="my_span" style="position:absolute;width:600;height:600;z-index:2;visibility:visible;">
   
             thanxs for reply

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20061114/02062313/attachment.htm>


More information about the Javascript mailing list