Random image loader using dynamic jpegs

hi all

i have downloaded the tutorial on random loading using swfs and it works fine when it’s all located in one dir, but when i reference it from another swf one dir up, it stretches out the images; i’m guessing that it’s all about paths; here’s my code (same as tut but with a stop action at the end):

//load the 6 random images
choice = Math.round(Math.random()*5);
switch (choice) {
case 0 :
location.loadMovie(“image0.swf”);
break;
case 1 :
location.loadMovie(“image1.swf”);
break;
case 2 :
location.loadMovie(“image2.swf”);
break;
case 3 :
location.loadMovie(“image3.swf”);
break;
case 4 :
location.loadMovie(“image4.swf”);
break;
case 5 :
location.loadMovie(“image5.swf”);
break;
}
stop();

next, i’m trying to use some code to dynamically load each image in the swfs noted above with something like this (eg, for image0.swf, below):

_root.createEmptyMovieClip(“imageHolder1”, 200);
imageHolder1._x=100;
imageHolder1._y=20;
loadMovie(“images/random01.jpg”,“imageHolder1”);

again, i think my issue in combining these 2 pieces of code is all about paths, but i’m stumped; any help would be greatly appreciated! thank you

:puzzled: