# Vertical scrolling in xml/flash gallery?

**URL:** https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190
**Category:** Uncategorized
**Created:** [July 5, 2008, 5:46pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190 "2008-07-05T17:46:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![YodelCoder](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@YodelCoder](https://forum.kirupa.com/u/YodelCoder)
#### Post date: [July 5, 2008, 5:46pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/1 "2008-07-05T17:46:45Z")

</div>

Hello!

Can anyone tell me how to go about making the thumbnails in the gallery scroll vertically instead of horizontally?

Cheers, it’s a great tutorial. 🙂

YC.

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 5, 2008, 7:23pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/2 "2008-07-05T19:23:51Z")

</div>

[QUOTE=YodelCoder;2353984]Hello!

Can anyone tell me how to go about making the thumbnails in the gallery scroll vertically instead of horizontally?

Cheers, it’s a great tutorial. 🙂

YC.[/QUOTE]

see if this helps

> **[XML Photo Gallery](https://www.kirupa.com/forum/showthread.php?t=199861)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

### Author: ![YodelCoder](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@YodelCoder](https://forum.kirupa.com/u/YodelCoder)
#### Post date: [July 5, 2008, 8:22pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/3 "2008-07-05T20:22:23Z")

</div>

:party: That’s perfect, cheers!  
YC.x

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 6, 2008, 9:25pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/4 "2008-07-06T21:25:13Z")

</div>

[QUOTE=YodelCoder;2354040]:party: That’s perfect, cheers!  
YC.x[/QUOTE]  
no problem 😉

---

<div class="post-metadata">

### Author: ![YodelCoder](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@YodelCoder](https://forum.kirupa.com/u/YodelCoder)
#### Post date: [July 7, 2008, 8:47am UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/5 "2008-07-07T08:47:24Z")

</div>

Hello again,

Thanks to stringy’s help, have got the gallery working perfectly as a standalone .swf file, but when I try to load it within a mc on my main site, the scroll function ceases to work… Is there something here I need to address to fix this?

Cheers  
YC.x

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 7, 2008, 6:11pm UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/6 "2008-07-07T18:11:51Z")

</div>

[QUOTE=YodelCoder;2354558]Hello again,

Thanks to stringy’s help, have got the gallery working perfectly as a standalone .swf file, but when I try to load it within a mc on my main site, the scroll function ceases to work… Is there something here I need to address to fix this?

Cheers  
YC.x[/QUOTE]  
try change to

```auto
function thumbNailScroller() {
	// thumbnail code! 
	this.createEmptyMovieClip("tscroller",1000);
	scroll_speed = 10;
	tscroller.onEnterFrame = function() {
		if ((_xmouse>=thumbnail_mc._x) && (_xmouse<=thumbnail_mc._x+thumbnail_mc._width)) {
			if ((_ymouse>=(hit_right._y-40)) && (thumbnail_mc.hitTest(hit_right))) {
				thumbnail_mc._y -= scroll_speed;
			} else if ((_ymouse<=(hit_left._y+40)) && (thumbnail_mc.hitTest(hit_left))) {
				thumbnail_mc._y += scroll_speed;
			}
		} else {
			delete tscroller.onEnterFrame;
		}
	};
}

```

---

<div class="post-metadata">

### Author: ![YodelCoder](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@YodelCoder](https://forum.kirupa.com/u/YodelCoder)
#### Post date: [July 16, 2008, 11:10am UTC](https://forum.kirupa.com/t/vertical-scrolling-in-xml-flash-gallery/265190/7 "2008-07-16T11:10:43Z")

</div>

🙂 Cheers,Stringy.

After stupidly spending ages making changes & wondering why nothing was happening, I realised that I was pointing the load function at an old version of the gallery, lol…

By the time I figured it out, I’d hit on putting this in the main timeline of the external gallery:

```auto
this._lockroot=true;

```

Seems to do the job nicely. 🙂 Thanks for all your help!  
YC.x
