I have tried many approaches and have no luck. ANY help on this would be appreciated as I have been trying to get this to work for a week. I am no JS guy so please “be-gentle” but I like direct!:o
NOTE: I prefer not to use the SWFobject.js to load my SWFs
Approach ONE: Rewrite to get rid of comment tags.
[CODE]
<div id=”myFlash”>
<!–<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ width=”1054″ height=”453″ id=”FlashID” title=”mymovie”>
<param name=”movie” value=”flash/banner.swf” />
<param name=”quality” value=”high” />
<param name=”wmode” value=”transparent” />
<param name=”swfversion” value=”8.0.35.0″ />
<param name=”expressinstall” value=”Scripts/expressInstall.swf” />
<object type=”application/x-shockwave-flash” data=”flash/banner.swf” width=”1054″ height=”453″>
<param name=”quality” value=”high” />
<param name=”wmode” value=”transparent” />
<param name=”swfversion” value=”8.0.35.0″ />
<param name=”expressinstall” value=”Scripts/expressInstall.swf” />
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href=”http://www.adobe.com/go/getflashplayer”><img src=”http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif” alt=”Get Adobe Flash player” /></a></p>
</div>
</object>
</object>–>
<script language=”javascript” type=”text/javascript”>
function reWriteFlash(){
var myHTML = document.getElementById(“myFlash”).innerHTML;
myHTML = myHTML.replace(“<!–“,””);
myHTML = myHTML.replace(“–>”,””);
document.getElementById(“myFlash”).innerHTML = myHTML;
}
</script>
</div>
Approach TWO: OnLoad ReWrite…
[CODE]
<script language=”javascript”>
<!–//hide
//function to write in flash object when page loads.
function writeFlash(){
//place your flash object tags inside a variable
// i’m gonna split it up a bit here, just for my own purposes of ledgability, and checking for errors… not really necessary.
var flashOut='<OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0″ WIDTH=”550″ HEIGHT=”100″ id=”javascripttest” ALIGN=””>’;
flashOut=flashOut+'<PARAM NAME=movie VALUE=”javascripttest.swf”>’;
flashOut=flashOut+'<PARAM NAME=quality VALUE=high>’;
flashOut=flashOut+'<PARAM NAME=bgcolor VALUE=#CC6600>’;
flashOut=flashOut+'<EMBED src=”javascripttest.swf” quality=high bgcolor=#CC6600 WIDTH=”550″ HEIGHT=”100″ NAME=”javascripttest” ALIGN=”” TYPE=”application/x-shockwave-flash” PLUGINSPAGE=”http://www.macromedia.com/go/getflashplayer”>’;
flashOut=flashOut+'</EMBED></OBJECT>’;
//create a layer tag to place your flash object into, and to position your flash object
//document.write(“<layer name=’flashLayer’ top=300 left=100>”+flashOut+”</layer>”);
//the above didn’t seem to work… so i’ll try:
//document.write(“<layer name=’flashLayer’>”+flashOut+”</layer>”);
//document.layer.flashLayer.top=500;
//still no go… maybe try it wil div… and style:
document.write(“<div name=’flashLayer’ style=’position:absolute; left:100px; top:300px;’>”+flashOut+”</div>”);
//this one seems to work in ie… but I have no way to control it and thr inline styles are going to reap havoc on my CMS.
}
//–>
</script>
<body onLoad=”writeFlash()”>