View Full Version : Help with putting swf in Javascript array

OOber nOOb
11-14-2010, 11:08 PM
Hello all,

There's this javascript array on an html page, with some gifs in it.

How can I include swfs in this array?

Here's the code:

<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 to Kabeoke' border='0' align='absmiddle' />";

document.getElementById("image").innerHTML = imgPath;


Thank-you SO much in advance :)