# ScrollPane Issues

**URL:** <https://forum.kirupa.com/t/scrollpane-issues/227473>\
**Category:** flash\
**Created:** [May 30, 2007, 4:03pm UTC](https://forum.kirupa.com/t/scrollpane-issues/227473 "2007-05-30T16:03:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newUser007](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@newUser007](https://forum.kirupa.com/u/newUser007)\
**Post date:** [May 30, 2007, 4:03pm UTC](https://forum.kirupa.com/t/scrollpane-issues/227473/1 "2007-05-30T16:03:24Z")

</div>

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&lt;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.
