Friends - I’m trying to load external images randomly to the scene but am having difficulty, the syntax in the code looks to be correct…what am I missing?
function showPic(val) {
var randomval = Math.round(Math.random()*7)
trace (randomval);
switch (randomval) {
case 0:
location.showPic = “image1.jpg”;
break;
case 1:
location.showPic = “image2.jpg”;
break;
case 2:
location.showPic = “image3.jpg”;
break;
case 3:
location.showPic = “image4.jpg”;
break;
case 4:
location.showPic = “image5.jpg”;
break;
case 5:
location.showPic = “image6.jpg”;
break;
}
location = “showPic”;
valmyInt = setInterval(showPic, 3000);
}
the instance name of the movie clip in the scene is “location”…please help