First, this only applies to IE, because IE is the only browser I can't get something to work in. So I want to dynamically create this Flash element right?
I get this 100 x 100 Flash element with nothing in it and when I right click it says "Movie not loaded...". Then I find what IE says "fe.outerHTML" is (I know it's bad, but it's only to see what IE thinks). Then I put that in the page.Code:window.onload = function () { var fe = document.createElement ("object"); fe.setAttribute ("type","application/x-shockwave-flash"); fe.style.width = "100px"; fe.style.height = "100px"; var me = document.createElement ("param"); me.setAttribute ("name","movie"); me.setAttribute ("value","test.swf"); fe.appendChild (me); document.body.appendChild (fe); };
Now that works. Why doesn't the first one work? It does in FF (except for FF it has to be "data" rather than "movie").Code:<OBJECT style="WIDTH: 100px; HEIGHT: 100px" type=application/x-shockwave-flash><PARAM NAME="movie" VALUE="test.swf"><PARAM NAME="_cx" VALUE="5080"><PARAM NAME="_cy" VALUE="5080"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Src" VALUE=""><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE=""><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"><PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0"><PARAM NAME="AllowNetworking" VALUE="all"><PARAM NAME="AllowFullScreen" VALUE="false"></OBJECT>
Thanks,
Stephen



Reply With Quote

Bookmarks