# \[F8\] can't manage thumbs!

**URL:** <https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797>\
**Category:** flash\
**Created:** [April 24, 2006, 6:30pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797 "2006-04-24T18:30:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 24, 2006, 6:30pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/1 "2006-04-24T18:30:12Z")

</div>

Hi, everybody:

Just want to put the thumbnails in a movie clip, any ideas…  
what am I doing wrong?  
Not any thumbs are appearing, there is a mc on stage, there are images and thumbs, there is a xml\_file…

```auto
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(ok) {
	if (ok) {
		parafrasis(gallery_xml);
	} else {
		trace("error");
	}
};
gallery_xml.load("images.xml");
function parafrasis(gallery_xml) {
	var galleryPictures = gallery_xml.firstChild.childNodes;
	totalPictures = galleryPictures.length;
	for (var i = 0; i<totalPictures; i++) {
		var currentPicture = galleryPictures*;
		var holder = thumbnails.createEmptyMovieClip("holding"+i, i);
		col = 8;
		row = 6;
		wi = 100;
		hi = 80;
		cuenta = 0;
		for (j=0; j<col; j++) {
			for (k=0; k<row; k++) {
				this["holding"+cuenta]._x = 20+wid*j;
				this["holding"+cuenta]._y = 20+hi*k;
				cuenta++;
			}
		}
		inner = holder.createEmptyMovieClip("thumbnail_image", 0);
		inner.loadMovie(currentPicture.attributes.thumbs);
		holder.image = currentPicture.attributes.images;
		holder.onRelease = function() {
			images.loadMovie(this.image);
		};
	}
}

```

Thanks in advanced!

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 24, 2006, 6:36pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/2 "2006-04-24T18:36:13Z")

</div>

Use ActionScript tags:) makes it easier to read ( [as] & [/as] without the spaces)

```auto
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(ok) {
	if (ok) {
		parafrasis(gallery_xml);
	} else {
		trace("error");
	}
};
gallery_xml.load("images.xml");
function parafrasis(gallery_xml) {
	var galleryPictures = gallery_xml.firstChild.childNodes;
	totalPictures = galleryPictures.length;
	for (var i = 0; i<totalPictures; i++) {
		var currentPicture = galleryPictures*;
		var holder = thumbnails.createEmptyMovieClip("holding"+i, i);
		col = 8;
		row = 6;
		wi = 100;
		hi = 80;
		cuenta = 0;
		for (j=0; j<col; j++) {
			for (k=0; k<row; k++) {
				this["holding"+cuenta]._x = 20+wid*j;
				this["holding"+cuenta]._y = 20+hi*k;
				cuenta++;
			}
		}
		inner = holder.createEmptyMovieClip("thumbnail_image", 0);
		inner.loadMovie(currentPicture.attributes.thumbs);
		holder.image = currentPicture.attributes.images;
		holder.onRelease = function() {
			images.loadMovie(this.image);
		};
	}
}

```

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 24, 2006, 6:44pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/3 "2006-04-24T18:44:21Z")

</div>

thanks for the advice, any other advice…please?

:q:

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 24, 2006, 7:05pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/4 "2006-04-24T19:05:28Z")

</div>

i was reading through it and trying to figure out what the issue is, but i started to get lost at about this point:

```auto
inner.loadMovie(currentPicture.attributes.thumbs);
holder.image = currentPicture.attributes.images;

```

Is “attributes” a node in your XML?

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 24, 2006, 7:26pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/5 "2006-04-24T19:26:01Z")

</div>

the attributes property is an associative array of the specified elements attributes… for instance…

```auto

<shape>
   <rectangle width="50" height="100" />
</shape>

```

Where width and height can be accessed…

```auto
firstNode.childNodes[0].attributes.width

```

or height respectively…

\_Michael

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 24, 2006, 7:27pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/6 "2006-04-24T19:27:31Z")

</div>

Unless dec’s xml is implemented wrong

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 24, 2006, 7:27pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/7 "2006-04-24T19:27:36Z")

</div>

Unless dec’s xml is implemented wrong

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 24, 2006, 8:25pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/8 "2006-04-24T20:25:38Z")

</div>

The xml is something like this:

```auto

<images>
    <picture title = "01"
			    thumb	= "thumbs/01.jpg"
			    image	= "images/01.jpg" />

```

The script works fine, but only for a row, that is why I implemented the other two loops the j and the k, and row and col, because I wanted a grid…but still don’t know what the problem is ::(:

---

<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 24, 2006, 8:39pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/9 "2006-04-24T20:39:12Z")

</div>

```auto
var col = 8;
var wi = 100;
var hi = 80;
function parafrasis(gallery_xml) {
	var galleryPictures = gallery_xml.firstChild.childNodes;
	totalPictures = galleryPictures.length;
	for (var i = 0; i<totalPictures; i++) {
		var currentPicture = galleryPictures*;
		var holder = thumbnails.createEmptyMovieClip("holding"+i, i);
		holder._x = 20+(i%col)*wi;
		holder._y = 20+Math.floor(i/col)*hi;
		inner = holder.createEmptyMovieClip("thumbnail_image", 0);
		inner.loadMovie(currentPicture.attributes.thumbs);
		holder.image = currentPicture.attributes.images;
		holder.onRelease = function() {
			images.loadMovie(this.image);
		};
	}
}

```

?

scotty(-:

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 24, 2006, 9:14pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/10 "2006-04-24T21:14:12Z")

</div>

Thank you scotty, but I can’t still manage ::(:  
this is my file…

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 25, 2006, 2:25am UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/11 "2006-04-25T02:25:38Z")

</div>

does anybody know a tutorial for dummies?, it is hard for me learning xml, this one I’m using I can understand…

any kind of help is welcome!

:book:

---

<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 25, 2006, 4:42am UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/12 "2006-04-25T04:42:46Z")

</div>

What isn’t working for you, cause for me it works…

scotty(-:

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 25, 2006, 5:22pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/13 "2006-04-25T17:22:13Z")

</div>

> [@scotty](#):
>
> What isn’t working for you, cause for me it works…
> 
> scotty(-:

could you please take a look at my\_gallery zip…please!(it is two posts above)

is it the file or I’m a fool!

thank you :puzzle:

---

<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 25, 2006, 5:28pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/14 "2006-04-25T17:28:41Z")

</div>

:lol: I did…

scotty(-:

---

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [April 25, 2006, 5:58pm UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/15 "2006-04-25T17:58:24Z")

</div>

I can’t see the thumbs, all I can see is black, I downloaded my own gallery and it still not working!

---

<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 26, 2006, 4:47am UTC](https://forum.kirupa.com/t/f8-cant-manage-thumbs/186797/16 "2006-04-26T04:47:28Z")

</div>

Check the names and paths to your pictures.

scotty(-:
