# Scrollpane. Oh....the pain!

**URL:** https://forum.kirupa.com/t/scrollpane-oh-the-pain/97910
**Category:** Uncategorized
**Created:** [December 31, 2003, 3:02am UTC](https://forum.kirupa.com/t/scrollpane-oh-the-pain/97910 "2003-12-31T03:02:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![crazybat](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@crazybat](https://forum.kirupa.com/u/crazybat)
#### Post date: [December 31, 2003, 3:02am UTC](https://forum.kirupa.com/t/scrollpane-oh-the-pain/97910/1 "2003-12-31T03:02:10Z")

</div>

Okay. After combing over the many examples of using the scrollpane, I am needing assistance in something I am working on.

The basic idea;

I am loading jpg thumbnails from an XML document into a scrollpane.

Next, I am taking these thumbnails and giving them on Release functionality.

Finally, I am displaying the large picture after the thumbnail has been clicked.

Everything works as intended. EXCEPT, the problem is loading the thumbnails into the scrollpane. Here’s the code I have so far;

* * *

\_global.picxml = new XML();  
picxml.ignoreWhite = true;

picxml.onLoad = function(success)  
{  
if (success) {  
parseXmlDoc(this);  
}  
else trace(‘xml screw up!’);  
};

picxml.load(“pics.xml”);

function parseXmlDoc(xmlDoc)  
{  
if (xmlDoc.loaded)  
{  
var yPos = 60;  
xmlLength = xmlDoc.firstChild.childNodes;

for( i=0; i \< xmlLength.length; i++ )  
{

xmlThumb = xmlDoc.firstChild.childNodes\*;  
imagePath = xmlThumb.attributes.thumbURL;

targetClip.duplicateMovieClip(i, i);

loadMovie(imagePath,_);  
this_.\_y = this\*.\_y + (i\*yPos);

}  
}  
this.cmpThumbs.setScrollContent(targetClip);  
this.cmpThumbs.refreshPane();  
}

* * *

I think the problem can be that the duplicate movie clips are being named; 0, 1, 2, 3, 4, 5, etc. I thought that by setting ‘targetClip’ to the scroll content would send the duplicate movie clips into the pane, but it does not.

On my stage, I have;

1. Empty movie clip. Instance; ‘targetClip’.
2. Scrollpane. Instance; ‘cmpThumbs’.

When my movie is created, I am having a look at the objects created;

Movie Clip: Frame=1 Target="\_level0.targetClip"  
Movie Clip: Frame=1 Target="\_level0.0"  
Shape:  
Movie Clip: Frame=1 Target="\_level0.1"  
Shape:  
Movie Clip: Frame=1 Target="\_level0.2"  
Shape:  
Movie Clip: Frame=1 Target="\_level0.3"  
Shape:  
Movie Clip: Frame=1 Target="\_level0.4"  
Shape:  
Movie Clip: Frame=1 Target="\_level0.5"  
Shape:

(FYI; I created the movies like this for my on Release function to connect to the appropriate child node to get the full size picture)

So, I thought that when you duplicate a movie, that I could pull in ‘targetClip’ into the scrollpane. But it’s not. I can see my  
thumbnails, but they float above the scrollpane.

Please…help a fellow flasher out. Any assistance would be appreciated. Thanks.

Whoever can get this for me, I’ll give you a cookie.

:beam:
