# Beginner's problem with thumbnail menu

**URL:** <https://forum.kirupa.com/t/beginners-problem-with-thumbnail-menu/149212>\
**Category:** Uncategorized\
**Created:** [May 26, 2005, 9:49pm UTC](https://forum.kirupa.com/t/beginners-problem-with-thumbnail-menu/149212 "2005-05-26T21:49:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrluthi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rrluthi/32/1340_2.png) [@rrluthi](https://forum.kirupa.com/u/rrluthi)\
**Post date:** [May 26, 2005, 9:49pm UTC](https://forum.kirupa.com/t/beginners-problem-with-thumbnail-menu/149212/1 "2005-05-26T21:49:02Z")

</div>

I’d like to populate a sidescrolling menu with thumbnail images. I’m loading the images externally using an xml file with the paths in it. I am learning actionscript now, so i’m pretty new to this stuff, but i am having an issue with this loop. It should be simple, but it’s not working correct.

```auto
function makeButton() {
	
	for(id = 1; id<=total;id++){
		duplicateMovieClip(m_button,"m_button"+id,9987)
		this["m_button"+id]._x = m_button._x + 70*id
	}
}

```

what I want this code to do is make a number (id = 12) of “m\_buttons” next to eachother, but instead, it is making one button 70\*12 pixels away, and not the ones in between.
