views:

213

answers:

1

I've preloaded images from xml into an array named arr. But I'm having problems with loadClip and getting the string from the array. So it doesn't load the image in the box.

Example:

arr[0] = "images/photo1.jpg";
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip(arr[0], box_mc.loader_mc);

Any thoughts on how to work around this?

+1  A: 

Solution for this is:

mcLoader.loadClip(arr[0].toString(), box_mc.loader_mc);
Belgurinn
you should never need to do .toString() on something that already is a string. are you sure the code in your question above is exactly what you are using?
grapefrukt
I generate the array when picking out the fields from xml otherwise it's the same.
Belgurinn