This script generats random images, and is supposed to generate random flash objects...however the flash object does not work...it does not load, however the images work fine. If ya have knowledge in this, i would be in your debt.
I think it MAY have to do with document.write() works...not sure though. I am fairly new to JS.
Thank you so much in advance..
-------
<SCRIPT>
<!-- Activate Cloaking Device
today=new Date();
jran=today.getTime();
var number = 5;
var random_number="";
var image="";
var flash="";
var text_color="";
// Random number generating scheme.
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
// String of if statements that load the appropriate image and text color based on random number.
if (random_number==1)
{
image="indianclouds.jpg";
flash="quote1.swf";
}
if (random_number==2)
{
image="thinker.jpg";
flash="quote2.swf";
}
if (random_number==3)
{
image="embrace.jpg";
flash="quote3.swf";
}
if (random_number==4)
{
image="fly.jpg";
flash="quote4.swf";
}
if (random_number==5)
{
image="arrow.jpg";
flash="quote5.swf";
}
// Deactivate Cloaking -->
</SCRIPT>
<script>
<!-- ACtivate Cloaking Device
document.write( "<td nowrap bordercolor=#CCCCCC background='"+image+"' bgcolor=#CCCCCC border=0>");
//Deactivate Cloaking -->
</script>
<center>
<object classid=clsid27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width=600 height=300 loop=false>
<script>
<!--Activate Cloaking Device
document.write("<param name=movie value='http://www.webdeveloper.com/forum/archive/index.php/"+flash+"'>");
//deactive cloaking-->
</script>
<param name=quality value=http://www.webdeveloper.com/forum/archive/index.php/high>
<param name=wmode value=transparent>
<param name=loop value=false>
<embed quality=high loop=false></embed>
</object>
</center>
I think it MAY have to do with document.write() works...not sure though. I am fairly new to JS.
Thank you so much in advance..
-------
<SCRIPT>
<!-- Activate Cloaking Device
today=new Date();
jran=today.getTime();
var number = 5;
var random_number="";
var image="";
var flash="";
var text_color="";
// Random number generating scheme.
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
// String of if statements that load the appropriate image and text color based on random number.
if (random_number==1)
{
image="indianclouds.jpg";
flash="quote1.swf";
}
if (random_number==2)
{
image="thinker.jpg";
flash="quote2.swf";
}
if (random_number==3)
{
image="embrace.jpg";
flash="quote3.swf";
}
if (random_number==4)
{
image="fly.jpg";
flash="quote4.swf";
}
if (random_number==5)
{
image="arrow.jpg";
flash="quote5.swf";
}
// Deactivate Cloaking -->
</SCRIPT>
<script>
<!-- ACtivate Cloaking Device
document.write( "<td nowrap bordercolor=#CCCCCC background='"+image+"' bgcolor=#CCCCCC border=0>");
//Deactivate Cloaking -->
</script>
<center>
<object classid=clsid27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width=600 height=300 loop=false>
<script>
<!--Activate Cloaking Device
document.write("<param name=movie value='http://www.webdeveloper.com/forum/archive/index.php/"+flash+"'>");
//deactive cloaking-->
</script>
<param name=quality value=http://www.webdeveloper.com/forum/archive/index.php/high>
<param name=wmode value=transparent>
<param name=loop value=false>
<embed quality=high loop=false></embed>
</object>
</center>