# F8 - Problem with loading image from an array, keeps trying to load 'null'

**URL:** <https://forum.kirupa.com/t/f8-problem-with-loading-image-from-an-array-keeps-trying-to-load-null/169410>\
**Category:** flash\
**Created:** [November 16, 2005, 3:31am UTC](https://forum.kirupa.com/t/f8-problem-with-loading-image-from-an-array-keeps-trying-to-load-null/169410 "2005-11-16T03:31:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NadePalm](https://avatars.discourse-cdn.com/v4/letter/n/e274bd/32.png) [@NadePalm](https://forum.kirupa.com/u/NadePalm)\
**Post date:** [November 16, 2005, 3:31am UTC](https://forum.kirupa.com/t/f8-problem-with-loading-image-from-an-array-keeps-trying-to-load-null/169410/1 "2005-11-16T03:31:17Z")

</div>

hello my tiny dancers, your feet are amazing.

ok heres my problem, ive used the tutorial XML Parsing with PHP, to list all files in a directory, and im making a gallery with thumbnails to show these files. now when i click on a thumbnail, it should load a larger version of the image into my image container, but it keeps trying to load null, as the image. and for some reason it only loads 7 thumbnails, even though in the txt file (which is just an example of what the php outputs) there are 8 files.

heres the code im using to load the thumbnails into their holders, name the labels etc.

```auto
 
for (p=0; p<noOfPics; p++) {
_root.thumbHolder["thumb"+p].blendMode_mc._alpha = 0;
_root.thumbHolder["thumb"+p].holder._alpha = 0;
thumbLoader.loadClip("images/"+files[p], _root.thumbHolder["thumb"+p].holder);
//////////////////////////////////////////////////////////////
blendColour = new Color(_root.thumbHolder["thumb"+p].blendMode_mc.blendColour);
blendColour.setRGB(colours[Math.floor(Math.random()*(colours.length-0))+0]);
_root.thumbHolder["thumb"+p].label_mc.label.text = files[p];
_root.thumbHolder["thumb"+p]._visible = true;
 
listen.onLoadStart = function(targetThumb) {
};
listen.onLoadProgress = function(targetThumb) {
};
listen.onLoadComplete = function(targetThumb) {
targetThumb.fadeIn();
_root.thumbHolder["thumb"+p].blendMode_mc.fadeIn();
trace("loaded "+targetThumb);
};
listen.onLoadInit = function(targetThumb) {
};
 
_root.thumbHolder["thumb"+p].onPress = function() {
imageLoader.loadClip("images/"+files[p], _root.popup.holder);
};
_root.thumbHolder["thumb"+p].onRollOver = function() {
this.blendMode_mc.fadeIn();
};
_root.thumbHolder["thumb"+p].onRollOut = function() {
this.blendMode_mc.fadeOut();
};
}
 

```

ive included the source files for anyone who thinks they can help, ive tried a few things, but alas they have failed. hopefully one of YOU have the solution, it would be much appreciated.

edit - DAMMIT, file is too large. um so i can email the source files to anyone who thinks they can help.

peace
