# attachMovie Depth

**URL:** <https://forum.kirupa.com/t/attachmovie-depth/266324>\
**Category:** flash\
**Created:** [July 18, 2008, 11:36am UTC](https://forum.kirupa.com/t/attachmovie-depth/266324 "2008-07-18T11:36:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 18, 2008, 11:36am UTC](https://forum.kirupa.com/t/attachmovie-depth/266324/1 "2008-07-18T11:36:01Z")

</div>

Howdy all,

I have another question. Basically I have a for loop that that pulls movie clips from the library and gives each one an \_alpha of 0.

I then have another script, which fades in a specific movieClip when the cursor in a certain position.

The problem I am having is that it only fades in the highest movieClip because it is the highest depth wise. I thought because all of the \_alpha is set to 0, you would see it anyway, alas this is not the case.

Here is the actions for my loop

```auto

var numMcs:Number = 17;
	
	for(i:Number = 0; i <= numMcs; i++)
	
	{
		
		
		if(Stage.width <= 1024){
			
			container.attachMovie("img"+i+"_mc", "img"+i, getNextHighestDepth(), { _width: 800 , _height: 462 });
			container["img"+i]._alpha = 0;
			
			
		}else if(Stage.width <= 1240){
			
			container.attachMovie("img"+i+"_mc", "img"+i, getNextHighestDepth(), { _width: 900 , _height: 419 });
			container["img"+i]._alpha = 0;

			
		}else if(Stage.width >= 1280){
			
			container.attachMovie("img"+i+"_mc", "img"+i, getNextHighestDepth(), { _width: 1040 , _height: 600 });
			container["img"+i]._alpha = 0;
			
			
		}
		
	}

```

I have tried both ‘getNextHighestDepth’ and just setting it to a number…no dice.

Any Ideas?

Thanks!!!
