# Help on setting the depth!

**URL:** <https://forum.kirupa.com/t/help-on-setting-the-depth/287123>\
**Category:** Uncategorized\
**Created:** [April 26, 2009, 11:15pm UTC](https://forum.kirupa.com/t/help-on-setting-the-depth/287123 "2009-04-26T23:15:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhintw](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jhintw](https://forum.kirupa.com/u/jhintw)\
**Post date:** [April 26, 2009, 11:15pm UTC](https://forum.kirupa.com/t/help-on-setting-the-depth/287123/1 "2009-04-26T23:15:43Z")

</div>

Need some help guys!!

I had this code to load a swf file outside the original .fla while the button is clicked.  
Everything works ok But when I add a background layer on the original .fla, the loaded swf is behind my background. What should I do to bring the loaded swf to the front???

Thanks in advance!!

```auto

var loader:Loader = new Loader();

button1.addEventListener( MouseEvent.MOUSE_OVER, mouseOverHandler);

function mouseOverHandler( e:MouseEvent ):void {
	
	var url:String;
	var buttonOver:Sprite = e.currentTarget as Sprite;
	
	if( buttonOver == button1 ){
		url = "./Intro1.swf"
	} else if ( buttonOver == button2 ){
		url = "./Intro2.swf"
	}
	
	//create a request
	var request:URLRequest = new URLRequest( url );
	
	if( loader ){
		TweenLite.to( loader, 1, { y:stage.stageHeight, ease:Quart.easeOut, onComplete:startLoad, onCompleteParams:[request] } );
	}
}

```
