Hello hello,

I have a javascript array to load a different picture each time a page loads up. The code is as follows:



<script type="text/javascript">
var imageArray = new Array();

imageArray[0] = "images/animation9.gif";
imageArray[1] = "images/Title2.gif";
imageArray[2] = "images/animation4.gif";

function doIt()
{
var rand = Math.floor(Math.random()*3);
var imgPath = "<img src='"+imageArray[rand]+"' alt='Welcome' border='0' align='absmiddle' />";
document.getElementById("image").innerHTML = imgPath;
}
</script>




So...it works fine with .gifs, but how would I get it to work with .swf movies too?

I've tried just putting the .swf in there e.g. ...

'imageArray[2] = "images/animation6.swf";

But that doesn't seem to work.

Any ideas?

Thank-you SO much in advance.