[Flash 8 Actionscript]: Help with loading dynamic movieclips into ScrollPane

Hi all-

I’m a beginner with Actionscripting, and struggling a lot with this issue.

What I’ve done: I’ve created a movieclip (”individual_listing”) in my library that has three dynamic text fields. I parse my XML using loops and “if” statements to fill in the appropriate data. Using “attachMovie,” the “individual_listing” movieclip repeats (so that it looks like a table with three columns and as many “rows” (i.e. attached movieclips) as needed.

What I want to do:My XML/movieclip “table” is too long; it needs to be scrollable. I am trying to load the “individual_listing” movieclips into an empty movieclip called “scrollMovieClip” that I rename to a movieclip variable called, “container_listing” that is set to scrollPane.content. I can’t get this to work. (Have tried creating both “scrollMovieClip” and “container_listing” in the library and exporting for Actionscript, and also tried to create it inside the scrollPane on the fly. Neither way seems to work.)

Relevant code is the following:
(p.s., this all is supposed to happen on a mouse event — when the user clicks the “00tab” movieclip, I want the scrollable table to display).

[SIZE=1]tab00.onRelease = function () {[/SIZE]
[INDENT][SIZE=1]scrollPane.contentPath = “scrollMovieClip”;
[/SIZE][SIZE=1]container_listing:MovieClip = scrollPane.content;[/SIZE][/INDENT] [INDENT][SIZE=1]var listingDepth=100;[/SIZE]
[SIZE=1]var countryName = childCountry[m].firstChild.firstChild.nodeValue;[/SIZE]
[SIZE=1]var yearName = childCountry[m].firstChild.nextSibling.firstChild.nextSibling.fir stChild.firstChild.nodeValue;[/SIZE]
[/INDENT][INDENT][SIZE=1]if ((countryName == “France”) && (yearName == “2000″)) {[/SIZE]
[SIZE=1]
[/SIZE]
[SIZE=1]//Populate dynamic text fields in mc with data
[/SIZE]
[SIZE=1]
[/SIZE]
[INDENT][SIZE=1]individual_listing.bank_ txt.text = childCountry[m].firstChild.nextSibling.firstChild.nextSibling.fir stChild.nextSibling.firstChild.nextSibling.firstChild.nodeValue;[/SIZE]
[SIZE=1]
[/SIZE]
[SIZE=1]individual_listing.project_txt.text = childCountry[m].firstChild.nextSibling.firstChild.nextSibling.fir stChild.nextSibling.lastChild.firstChild.nodeValue ;[/SIZE]
[/INDENT][INDENT][SIZE=1]individual_listing.amoun t_txt.text = childCountry[m].firstChild.nextSibling.firstChild.nextSibling.fir stChild.nextSibling.firstChild.nextSibling.nextSib ling.firstChild.nodeValue;[/SIZE]
[/INDENT][SIZE=1]//attach populated mc inside movieclip variable set to scrollPane.content
[/SIZE]
[INDENT][SIZE=1]container_listing.attachMovie (”individual_listing”, “individual_listing”, container_listing.getNextHighestDepth (), {_y : (listingDepth) , _x : (490)});[/SIZE]
[/INDENT][SIZE=1]//Moves next dynamic movie clip down a spot[/SIZE]
[INDENT][SIZE=1]listingDepth += individual_listing._height + 2;[/SIZE]
[/INDENT][INDENT][SIZE=1] }
[/SIZE][/INDENT][SIZE=1]scrollPane.invalidate();[/SIZE]
}
[/INDENT] [SIZE=1] }[/SIZE]

[SIZE=1][SIZE=2]Any ideas? Help desperately needed…[/SIZE]
[/SIZE]