Display order of dynamic content

Hey all;

I’ve been working on this catalog system for awhile now, and have it working almost perfectly. But one problem still remains…

I’m dynamically loading content (jpgs & text) into a scrollpane from an xml file. It should display an image, and then below it some associated text. My problem is that when the content loads in, the first jpg isnt visible. I’m pretty sure its there because all the other jpgs load. What I think is happening is that the scrollpane is displaying the text below the 1st jpg at the very top of the scrollpane, which leaves the jpg above the scrollpane and thus not visible.

When I first started this catalog. I was loading the content into an MC I had manually created and was attaching to the scrollpane via attachMovie. I had the same problem as above in this scenario as well…and to correct that what I did was make a box that went around the entire are that the jpgs and text loaded into. This allowed the jpg to show up.

But now that I’m dynamically creating both the holder MC and the textfield, I’m back to losing the 1st jpg image. It seems to me that the scrollpane needs something above the jpg holder MC for it to be displayed.

I’m really frustrated right now as this is really the last thing to complete. Any suggestions or help is appreciated.

Here is the code I’m using to load and create everything.

Here’s the code:
[AS]tFormat = new TextFormat()
tFormat.font = “Verdana”;
tFormat.size = 10;
function buildList(){
theDepth = 100;
this.createEmptyMovieClip (“con”, 10);
var albumsNodeList = albumXML.firstChild.childNodes[0].childNodes;
for (var i=0; i < albumsNodeList.length; i++){
buildContent (albumsNodeList, i);
}
//Attaches the clip of items to a scrollpane component, with an instance name of “albumsPane”
this.albumsPane.setScrollContent(con);
}
function buildContent (xmlNodeList, intIndex){
var theJpg = xmlNodeList[intIndex].attributes.jpegURL;
var theJpg2 = xmlNodeList[intIndex].attributes.jpeg2URL;
var theInfo = xmlNodeList[intIndex].childNodes;
var theName = “item_” + intIndex;
con.createEmptyMovieClip(theName,theDepth++)._y = 350 * spacing;
con[theName].createEmptyMovieClip( “imgHolder”,1).loadMovie(theJpg);
con[theName].createEmptyMovieClip( “imgHolder2”,3).loadMovie(theJpg2);
con[theName].createTextField(“infoText”,2,5,155,345,125);
with(con[theName].infoText){
multiline = true;
wordWrap = true;
html= true;
htmlText= theInfo;
autoSize = true;
setTextFormat(tFormat);
}
with(con[theName].imgHolder){
_x = 5;
_y = con[theName].infoText._height - 155;
}
with(con[theName].imgHolder2){
_x = 160;
_y = con[theName].infoText._height - 155;
}
spacing++;
}
stop ();[/AS]

Thanks for any and all help.