Skip to main content
Participant
May 28, 2006
Question

Random Image is BLANK

  • May 28, 2006
  • 1 reply
  • 157 views
Ok I have been ripping my hair out trying to get this to work. I am using the following code to randomly show an image within an instance each time the page refreshes:

onClipEvent (load){
num = (Math.random())*10;
rand = Math.round(num);
if (rand==0) {
rand = 1;
}
loadMovie("image_movie"+rand+".swf",_root.target1);
}

I have 10 .swf files, image_movie1 through image_movie10, and my instance is named target1. Seems fairly simple, no? Yet no image shows. No errors, nothing, Flash acts like it's fine. So why is nothing showing?
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 28, 2006
your target movieclip is _root.target1 or target1 is a child of the movieclip to which that code is attached?