0

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.

William Smith
  • 792
  • 1
  • 7
  • 20

2 Answers2

3

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.

Community
  • 1
  • 1
strah
  • 6,557
  • 4
  • 30
  • 45
  • okay, it is evil. thanks for the heads up. I have a situation where the nested conditional statements do not work, so i'm trying everything. I can load the flash player for either scenario separately, but when i try to use nested and/or conditional it doesn't work for both cases. it's my understanding that with SWFObject, the nested conditional statement is used correct? – William Smith Jun 12 '12 at 16:37
0

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.

howderek
  • 2,192
  • 12
  • 23
  • thanks for the answer. I'm reworking everything with SWFobject using dynamic publishing so hopefully it will all work out and i'll be better for the experience of having thought of trying it this way. – William Smith Jun 12 '12 at 23:54