follow up: while I had already been using swfobject with static publishing, dynamic publishing solved my problem. Thanks for the help.
oops! I just deleted the original post.
follow up: while I had already been using swfobject with static publishing, dynamic publishing solved my problem. Thanks for the help.
oops! I just deleted the original post.
Why don't you use SWFObject? It's much more robust than document.write
and more flexible.
Just go for 'dynamic publishing' and SWFObject will do everything you need for you.
Besides, document.write
is evil.
I agree with strah that SWFObject is the way to go, but if you still want to insert HTML in a certain place you can use a div:
<div id="Flash"></div>
Then use the following javascript:
document.getElementById("Flash").innerHTML = "flashStuff";
Also, I would like to point out that the last half of the objects are the same, so you could use the if just for the first part to save space.