# Replacing loadRandom function

**URL:** <https://forum.kirupa.com/t/replacing-loadrandom-function/270376>\
**Category:** Uncategorized\
**Created:** [September 9, 2008, 10:26am UTC](https://forum.kirupa.com/t/replacing-loadrandom-function/270376 "2008-09-09T10:26:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphiedee](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@ralphiedee](https://forum.kirupa.com/u/ralphiedee)\
**Post date:** [September 9, 2008, 10:26am UTC](https://forum.kirupa.com/t/replacing-loadrandom-function/270376/1 "2008-09-09T10:26:20Z")

</div>

I have an xml file that loads jpgs in an swf. Right now the images in the file load randomly. The AS in the fla has a loadRandom function. My question is what is the proper function name to use to so the images load in order 1 thru 10?

AS.2.0 code now

function loadRandom() {  
var v1 = largePath + xml.childNodes[witch\_image].attributes.large;  
trace(v1);  
witch\_image++;  
if (witch\_image \>= numImages) {  
witch\_image = 0;

thx
