Help please with random loading .jpg banners

I am trying to create a movie clip that loops and on each loop it loads a random little .jpg banner from a directory. The banners are named 0.jpg, 1.jpg and so on, a script on the first frame of the loop saying

_root.randomnumber = random(_root.bannernumber);
_root.bannerloop.bannerholder.loadMovie("http://www.url.com/directory/"+_root.randomnumber+".jpg");

“bannernumber” is a variable from an external text file specifying how many random numbers to cycle through (how many banners), This works just fine and loads up a new banner after each loop cycle. The problem lies in trying to make each banner go to its own url, I have another external text document with variables “click0=url, click1=url etc” where I want the number in each variable to equal the randomnumber variable in flash, then use an
on(release){getURL(urlvariable)} function to have it retrieve the url that is somehow in the url variable. Basically, how would I make the urlvariable be equal to the “click0” variable to get the url of the click0 variable into the getURL function? while having the number in the “click0” variable be equal to the randomnum variable? Thank you in advance for help…

If I’m going about the random banner thing completely wrong let me know, please let me know how you would do it, or a link to a good tutorial would be nice. Thank you…

have you tried searching for “random load images”? because i remember writing a script for someone that would be stupidly easy to adapt to your purpose :wink:

Prophet.

PS if it doesnt turn up it may be past the deletion date to keep the load off the kirupa servers…

I figured it out in 10 mintues this morning (after sitting for hours trying to figure it out last night), all that I had to do was use eval() to create a variable out of the 2 values, thanks for your suggestion tho.