# Loading external content on top of main content

**URL:** <https://forum.kirupa.com/t/loading-external-content-on-top-of-main-content/318739>\
**Category:** Uncategorized\
**Created:** [January 28, 2011, 7:01pm UTC](https://forum.kirupa.com/t/loading-external-content-on-top-of-main-content/318739 "2011-01-28T19:01:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![outback](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@outback](https://forum.kirupa.com/u/outback)\
**Post date:** [January 28, 2011, 7:01pm UTC](https://forum.kirupa.com/t/loading-external-content-on-top-of-main-content/318739/1 "2011-01-28T19:01:17Z")

</div>

Hi all,

I’m loading one SWF into another but the internal one is coming over the main content and that can’t happen.

here is the part of my code where the external content is being loaded anyone has any ideas on what I can do to fix this?

thanks a lot here is my code:

```auto
var loadAnimBox:Loader = new Loader();
var vid_mc:MovieClip;

function startLoading():void {
    loadAnimBox.contentLoaderInfo.addEventListener(Event.COMPLETE, onBoxLoaded);
	loadAnimBox.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onBoxProgress);
    // load the box animation SWF
  	loadAnimBox.load(new URLRequest((meuCaminho.parameters.cont) + ".swf"));
}

function onBoxProgress(e:ProgressEvent):void{
	//trace(e.bytesLoaded,e.bytesTotal);
}

function onBoxLoaded(e:Event):void {
    loadAnimBox.contentLoaderInfo.removeEventListener(Event.COMPLETE, onBoxLoaded);
	loadAnimBox.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onBoxProgress);
    vid_mc = loadAnimBox.content as MovieClip;
    // We listen for that event:
    vid_mc.addEventListener("firstAnimationComplete", onFirstComplete, false, 0, true);    
    addChild(vid_mc);
    vid_mc.addEventListener(Event.ENTER_FRAME, playProgress);

```
