I know this has been beaten to death…but I am having similar problems with the scrollpane.
I read from an XML file and get the pictures onto a movie clip. now I wanna put these pictures in a scrollpane and when a user clicks on a picture a larger version of the image should appear on the main display screen.
here’s the code: it must be familiar to most of you.
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
spacing = 70;
scroll1.contentPath = **"scroll_mc"**;//[COLOR="DarkRed"]**scroll_mc was an empty movie clip i created to export for actionscript.**[/COLOR]
foo = scroll1.content;//**[COLOR="DarkRed"]scroll1 is the name of the scrollpane instance on the screen[/COLOR]**
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes*;
foo.createEmptyMovieClip("jpgWrapper"+i,i); foo["jpgWrapper"+i].loadMovie(this.firstChild.childNodes*.attributes.thmb);
foo["jpgWrapper"+i]._x= i*spacing;
loader.loadMovie(this.firstChild.childNodes*.attributes.main);
**foo["jpgWrapper"+i]**.onPress = function() {//[COLOR="DarkRed"]not sure what should be before onPress[/COLOR]
loader.loadMovie(picHolder.attributes.main);
};
};
};
myPhoto.load(“xmlphoto.xml”);
any help on this would be great.
thanks a lot.