I saw Adobe recommendation, but there was static html-code for embed. I try use dynamically by JS, but strange thing. flash-player was embed into page. But swf-movie - not. I think something wrong with name parametr. But can't guess how need do right.
static (working)
object type="application/x-shockwave-flash" data="menu.swf" width="1200" height="300">
<param name="movie" value="menu.swf"/>
</object>
dynamically (not working)
var node=document.createElement('object');
document.body.appendChild(node);
node.type="application/x-shockwave-flash"
node.data="menu.swf"
//node.name="menu.swf"
node.width="300"
node.height="300"
var p=document.createElement('param');
p.name="movie"
p.value="menu.swf"
node.appendChild(p)
I tried make many combinations, but nothing working
This problem strongly for IE11. For other versions IE working next code:
var node=document.createElement('object');
document.body.appendChild(node);
node.classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
node.movie="menu.swf"
...
There was 2 mistakes in my code.
Main feature - the addition object to DOM must be AFTER ASSEMBLY of the object:
or
Next feature - there was tag in html head:
If IE11 find X-UA-Compatible less then 11/edge, there is need old style embed flash (classid). If there is not X-UA-Compatible or value is 11/edge - then need new style as type="application/x-shockwave-flash" in html