Scrollpane. Oh....the pain!

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:

Problem is this:
this.cmpThumbs.setScrollContent(targetClip);
the scrollpane only takes ONE clip instance as target, not many, so all you gotta do is duplicate your clips into a target/holder clip, and set this master container as target of the scroll-pain :slight_smile:

Hey eyezberg. Thanks for the reply. Being New Year’s Eve and all, I’ll give this a try after the New Year’s celebrations are complete.

Thanks for the response!