# addChild clip of externally loaded movie's library

**URL:** <https://forum.kirupa.com/t/addchild-clip-of-externally-loaded-movies-library/260928>\
**Category:** flash\
**Created:** [May 21, 2008, 3:45am UTC](https://forum.kirupa.com/t/addchild-clip-of-externally-loaded-movies-library/260928 "2008-05-21T03:45:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clayrain](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@clayrain](https://forum.kirupa.com/u/clayrain)\
**Post date:** [May 21, 2008, 3:45am UTC](https://forum.kirupa.com/t/addchild-clip-of-externally-loaded-movies-library/260928/1 "2008-05-21T03:45:05Z")

</div>

Hi,

How do use addChild to add an externally loaded movieClip from an externally loaded movie’s library?

For example:

There are two movies, loadtest.swf and myshapes.swf. Loadtest.swf loads in myshapes.swf.

In the library of myshapes.swf are two movieClips: square and circle. In properties/linkage both have a class named after the name of the clips (ie. square for the square movie clip; circle for the circle movie clip).

I have no problem loading the myshapes.swf into the loadtest clip. I’m just stuck on how to load the clip’s from that externally loaded movie’s library.

//CODE FROM THE loadtest.fla file  
var mainmovie:Loader = new Loader();  
var externalURL:URLRequest = new URLRequest(“myshapes.swf”);  
mainmovie.load(externalURL);  
mainmovie.contentLoaderInfo.addEventListener(Event.COMPLETE, loadmyclip);

function loadmyclip(loadEvent:Event){  
addChild(loadEvent.currentTarget.content);

}

stop();

[URL=“[http://artbu.com/loadtest.zip](http://artbu.com/loadtest.zip)”]

Thank you for any help on this problem.
