# Landscape/Portrait Thumbs not lining up in gallery

**URL:** https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168
**Category:** flash
**Created:** [April 2, 2006, 11:17pm UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168 "2006-04-02T23:17:46Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![nabskater](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nabskater](https://forum.kirupa.com/u/nabskater)
#### Post date: [April 2, 2006, 11:17pm UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/1 "2006-04-02T23:17:46Z")

</div>

Hey guys, I Fiannly got the XML photo gallery the way i want it, but when i tried adding my own pictures/thumbs some of them are vertical as opposed to horizontal. There ends up being a big space in between them, and some overlap each otehr and other ones than that just dont show up at all.

[http://www.sunsetpics.net/familypics/Template.swf](http://www.sunsetpics.net/familypics/Template.swf)

Thats what it looks like. …yeah i know… not to good.:hurt:

My Question is should i just go into photoshop and put them all on a black 300x200 canvas so theres a black border around it and theyll all be the same image size or is there a way around it.

Fla and XML attached however xml is set up to work local after wthe first 7 which i changed to get the pic from the URL so you can see what im tlaking about.

Nick :hr:

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 3, 2006, 6:00am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/2 "2006-04-03T06:00:20Z")

</div>

Maybe this will help  
[http://www.kirupa.com/forum/showthread.php?t=214137](http://www.kirupa.com/forum/showthread.php?t=214137) post #12

scotty(-:

---

<div class="post-metadata">

### Author: ![nabskater](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nabskater](https://forum.kirupa.com/u/nabskater)
#### Post date: [April 4, 2006, 9:10pm UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/3 "2006-04-04T21:10:31Z")

</div>

Hey scotty thanks so much! Now if i could just figure out why the darn thumbnails are getting so messed up! RAR! haha

Nick :hr:

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 5, 2006, 5:19am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/4 "2006-04-05T05:19:31Z")

</div>

what’s the code for the thumbs?

scotty(-:

---

<div class="post-metadata">

### Author: ![nabskater](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nabskater](https://forum.kirupa.com/u/nabskater)
#### Post date: [April 6, 2006, 3:35am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/5 "2006-04-06T03:35:30Z")

</div>

Here it is. The thumbnails are getting all messed up and lining up on top of each other and all this weird stuff.

```auto
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
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._x -= scroll_speed;

} else if ((_root._xmouse<=310) && (thumbnail_mc.hitTest(hit_left))) {

thumbnail_mc._x += 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._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {

p = this.pictureValue-1;
nextImage();

};
target_mc.onRollOver = function() {

this._alpha = 50;
thumbNailScroller();

};
target_mc.onRollOut = function() {

this._alpha = 100;

};

};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);

}

```

Nick :hr:

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 6, 2006, 7:00am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/6 "2006-04-06T07:00:35Z")

</div>

Try this:

```auto
function thumbnails_fn(k) {
	thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
	tlistener = new Object();
	tlistener.onLoadInit = function(target_mc) {
		if (k>0) {
			target_mc._x = thumbnail_mc["t"+(k-1)]._x+thumbnail_mc["t"+(k-1)]._width+5;
		} else {
			target_mc._x = hit_left._x;
		}
		target_mc.pictureValue = k;
		target_mc.onRelease = function() {
			p = this.pictureValue-1;
			nextImage();
		};
		target_mc.onRollOver = function() {
			this._alpha = 50;
			thumbNailScroller();
		};
		target_mc.onRollOut = function() {
			this._alpha = 100;
		};
	};
	image_mcl = new MovieClipLoader();
	image_mcl.addListener(tlistener);
	image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

```

scotty(-:

---

<div class="post-metadata">

### Author: ![nabskater](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nabskater](https://forum.kirupa.com/u/nabskater)
#### Post date: [April 8, 2006, 10:14pm UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/7 "2006-04-08T22:14:25Z")

</div>

Well if definielty did something… it didnt fix it tho. Now it only shows the thumbs for picture 5, 33, 31 and 4. In that order and they are overlapping. Before it at least had about 90% of the thumbs visable. You can still click next and previous to navigate thru them so i know theyre there. I just cant figure this out!

Nick :hr:

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 9, 2006, 6:35am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/8 "2006-04-09T06:35:19Z")

</div>

Try this one

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

  
post #14 plus the fix in post #20

scotty(-:

---

<div class="post-metadata">

### Author: ![nabskater](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nabskater](https://forum.kirupa.com/u/nabskater)
#### Post date: [April 10, 2006, 3:09am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/9 "2006-04-10T03:09:15Z")

</div>

hmm that didnt work, i think im just going to go ahead and do the canvas resizing on all of them so theyre all nice and evenly sized. Thanks for helping scotty! All you do here is really amazing!

Nick:hr:

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 10, 2006, 7:24am UTC](https://forum.kirupa.com/t/landscape-portrait-thumbs-not-lining-up-in-gallery/184168/10 "2006-04-10T07:24:09Z")

</div>

no problem =)
