# Weird duplicateMovie Problem

**URL:** <https://forum.kirupa.com/t/weird-duplicatemovie-problem/198041>\
**Category:** flash\
**Created:** [August 22, 2006, 12:07am UTC](https://forum.kirupa.com/t/weird-duplicatemovie-problem/198041 "2006-08-22T00:07:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaDeViL](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@DaDeViL](https://forum.kirupa.com/u/DaDeViL)\
**Post date:** [August 22, 2006, 12:07am UTC](https://forum.kirupa.com/t/weird-duplicatemovie-problem/198041/1 "2006-08-22T00:07:53Z")

</div>

need someone else to look at this – i am going crazy trying to debug it.

Here is the code followed by the trace output. It doesnt set the properties of the duplicated movie correctly–and does not show the duplicated movies…i dont know why aargh!!

Thanks

Code:

```php

menu = this.firstChild.childNodes;
			numberOfGalleries = menu.length;
			var size = 30;
			var j=0;
			while (j<numberOfGalleries) {
				trace("j= "+j);
				galleryName = menu[j].attributes.name;
				trace("galleryName = "+galleryName);
				
				duplicateMovieClip(galleryButton, "galleryButton"+j,j+10);								
			
				this["galleryButton"+j]._y = size;
				trace("_y Property = "+this["galleryButton"+j]._y);
				
				// hardcoded duplicated movie name
				trace("_y Property = "+galleryButton0._y);
				
				this["galleryButton"+j]._x= -372.0;
				trace("_x Property = "+this["galleryButton"+j]._x);
				
				this["galleryButton"+j].galleryName = galleryName;
				
				// hardcoded movieClip Name
				trace("MovieClip.galleryName = " + galleryButton0.galleryName);
				
				
				butArray.push("galleryButton"+j);
				size = size-30;
				 j++;
			}

```

Trace:

> 

j= 0  
galleryName = Bowling  
\_y Property =  
\_y Property = -334.45  
\_x Property =  
MovieClip.galleryName =  
j= 1  
galleryName = Bowling2  
\_y Property =  
\_y Property = -334.45  
\_x Property =  
MovieClip.galleryName =

Thanks!
