# Targeting an mc created with "createEmptyMovieClip"

**URL:** <https://forum.kirupa.com/t/targeting-an-mc-created-with-createemptymovieclip/260388>\
**Category:** flash\
**Created:** [May 15, 2008, 2:18am UTC](https://forum.kirupa.com/t/targeting-an-mc-created-with-createemptymovieclip/260388 "2008-05-15T02:18:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![popp79](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@popp79](https://forum.kirupa.com/u/popp79)\
**Post date:** [May 15, 2008, 2:18am UTC](https://forum.kirupa.com/t/targeting-an-mc-created-with-createemptymovieclip/260388/1 "2008-05-15T02:18:46Z")

</div>

HELP! 😑

Hello all.  
I’m having a horrible time trying to load an external swf into an mc created using “createEmptyMovieClip”

Can someone look this over and help me out?

```auto
function executeMenuAction(action){
	// preloader start invisible
	contentClip.pre._alpha = 0;
	// i create the container clip
	var container:MovieClip = contentClip.createEmptyMovieClip("container", this.getNextHighestDepth());
	// the MovieClipLoader class...
	var mcLoader:MovieClipLoader = new MovieClipLoader();
	// the listener Object...
	var listener:Object = new Object();
	// while loading
	listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
		integer = Math.round((bytesLoaded*100)/bytesTotal);
		contentClip.pre._xscale = integer;
	}
	// when load starts
	listener.onLoadStart = function(target:MovieClip):Void {
		contentClip.pre._alpha = 100;
		contentClip.pre._xscale = 0;
	}
	// when first frame loaded clip init
	listener.onLoadInit = function(target:MovieClip):Void {
		contentClip.pre._alpha = 0;
		target._x = -target._width/2 + contentClip._width/2;
		target._y = -target._height/2 + contentClip._height/2;
	}
	// adding the listener to the loadClip
	mcLoader.addListener(listener);
	// here is where i finally use the "action" xml tag as the url to be passed
	// so we have that the "action" will load inside the "container" movie clip, and that´s all ;)
	mcLoader.loadClip(action, container);
	}
	
// you could also use this function to load some content at first, for example:
// executeMenuAction("description.swf");

```

The AS is from a menu I bought, which works well on the root of the movie, but this menu is a few mc’s inside of the movie.

The relative path to the “contentClip” is :

```auto
this.general.photo.contentClip

```

The absolute path to “contentClip” is:

```auto
_root.general.photo.contentClip

```

I can upload the fla if that would help.  
Thanks for looking!
