# XML Thumbnail Photo Gallery - I want to scroll vertically

**URL:** <https://forum.kirupa.com/t/xml-thumbnail-photo-gallery-i-want-to-scroll-vertically/200884>\
**Category:** flash\
**Created:** [September 16, 2006, 3:19am UTC](https://forum.kirupa.com/t/xml-thumbnail-photo-gallery-i-want-to-scroll-vertically/200884 "2006-09-16T03:19:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgulotta](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cgulotta](https://forum.kirupa.com/u/cgulotta)\
**Post date:** [September 16, 2006, 3:19am UTC](https://forum.kirupa.com/t/xml-thumbnail-photo-gallery-i-want-to-scroll-vertically/200884/1 "2006-09-16T03:19:05Z")

</div>

I completed kirupa’s handy little thumbnail photogallery tutorial. I would like to scroll vertically and I realize I need to change the x and y values at different spots and I was able to make it face vertically and I can get it to scroll up but not back down. Any help would be appreciated. here is the code

function thumbNailScroller() {  
thumbnail code!  
[//this.createEmptyMovieClip](https://this.createEmptyMovieClip)(“tscroller”, 1000);  
scroll\_speed = 5;  
tscroller.onEnterFrame = function() {  
if ((\_root.\_ymouse\>=thumbnail\_mc.\_y) && (\_root.\_ymouse\<=thumbnail\_mc.\_y+thumbnail\_mc.\_height)) {  
if ((\_root.\_xmouse\>=(hit\_right.\_x-40)) && (thumbnail\_mc.hitTest(hit\_right))) {  
thumbnail\_mc.\_y -= scroll\_speed;  
} else if ((\_root.\_xmouse\<=40) && (thumbnail\_mc.hitTest(hit\_left))) {  
thumbnail\_mc.\_y += scroll\_speed;  
}  
} else {  
delete tscroller.onEnterFrame;  
}  
};  
}

function thumbnails\_fn(k) {  
thumbnail\_mc.createEmptyMovieClip(“t”+k, thumbnail\_mc.getNextHighestDepth());  
tlistener = new Object();  
tlistener.onLoadInit = function(target\_mc) {  
target\_mc.\_y = hit\_left.\_y+(eval(“thumbnail\_mc.t”+k).\_height+2)\*k;  
target\_mc.pictureValue = k;  
target\_mc.onRelease = function() {  
p = this.pictureValue-1;  
nextImage();  
};
