I’ve tried multiple ways to edit Flash Objects / Embeds via Javascript and it seems to work in everything but IE, so I’m thinking about just throwing IE out the window for this application unless there are older + used version of other browsers that also do not allow you to edit objects. An example of this would be:
document.getElementById(divID).innerHTML = '<object ...><embed ...><\/embed><\/object>';
or in jquery
var params = '<param name="allowFullScreen" value="true" />' +
'<param name="allowScriptAccess" value="always" />' +
'<param name="allowNetworking" value="all" />' +
'<param name="movie" value="player.swf" />' +
$("#objectPlayer").html(params);
If all the rest of the modern browsers and the most used versions of them do support this kind of editing then I’ll just scrap IE. And before I get floods of the SWFObject JS Framework, I’m not going to include a huge framework for a browser that I do not believe is going to contain my demographic.
JSFiddle
Here’s a link to a JSFiddle I created. It works in all browsers but IE8
I believe the
<param>part of your code is for<object>.You have to pass the name/value pairs for
embedtoo.But I would use SWFObject anyway, it is the industry standard, it’s quite robust and it is the best way of embedding flash on the website.