# Import swf, use linked library assets?

**URL:** <https://forum.kirupa.com/t/import-swf-use-linked-library-assets/296114>\
**Category:** Uncategorized\
**Created:** [September 9, 2009, 5:48pm UTC](https://forum.kirupa.com/t/import-swf-use-linked-library-assets/296114 "2009-09-09T17:48:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gotoAndCrash](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gotoAndCrash](https://forum.kirupa.com/u/gotoAndCrash)\
**Post date:** [September 9, 2009, 5:48pm UTC](https://forum.kirupa.com/t/import-swf-use-linked-library-assets/296114/1 "2009-09-09T17:48:46Z")

</div>

Greetings,  
I’ve spent the last two hours (or so) trying to find a solution to this. I’m working on a project & need fairly urgent help.

The Concept:  
I have fla\_A, and fla\_B. fla\_B contains a single MovieClip which contains a bunch of MovieClips that are all set to Export for ActionScript (NOT first frame, as this will need to be preloaded). I want to load fla\_B into fla\_A, and be able to instantiate the nested clips (inside fla\_B) as if they were native to fla\_A itself.

After loading the swf, I’m using:

```auto
var _someMC:Class = e.currentTarget.applicationDomain.getDefinition('_someMC') as Class;
var clip:MovieClip = new _someMC() as MovieClip;
addChild(clip);

```

which works fine, EXCEPT that I’m not always going to be in the “onSwfLoadedComplete” function, & as such will not always have access to “e.currentTarget”, & I don’t want to reload the external swf every time I want a new asset.

Can I cast “e.currentTarget” as something useful like MovieClip (well, not MovieClip, 'cause that doesn’t work), or something that will stick around from which I can dynamically load things?  
Am I looking at this wrong?

Anyone, please?!? 🙂
