# Merging loaded SWF content

**URL:** https://forum.kirupa.com/t/merging-loaded-swf-content/278890
**Category:** flash
**Created:** [January 7, 2009, 3:06am UTC](https://forum.kirupa.com/t/merging-loaded-swf-content/278890 "2009-01-07T03:06:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![darnpunk](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@darnpunk](https://forum.kirupa.com/u/darnpunk)
#### Post date: [January 7, 2009, 3:06am UTC](https://forum.kirupa.com/t/merging-loaded-swf-content/278890/1 "2009-01-07T03:06:42Z")

</div>

Hi,

This is my first post here in kirupa. So greetings to everyone!

Ok let me get straight to the question. I am trying to merge loaded SWF content into one centralized data placeholder. The SWFs will be loaded through a Loader class. From what I know, as soon as the Loader class dispatches Event.COMPLETE, I can have access to the SWF content. What I am trying to merge here are the classes in the SWFs.

Why I need this is because, I am building a game where the character will have equipments for different body parts. Let say the head, body, bottom. I will load Head.swf, Body.Swf, Bottom.swf. After fully loaded, I will access the assets through standardized classNames (e.g. HeadPart1, HeadPart2 using getDefinitionByName(className)).

Currently, I can do this if I am getting the content from each individual Loader object - loader.contentLoaderInfo.applicationDomain.getDefinition(className) but I am guessing if I have many other body parts, I will need more Loader objects.

So I am wondering if there is a way where I can grab all the loaded content from a loaded Loader into a data placeholder? I foresee there might be naming conflicts if I try to merge a Head2.swf inside the data placeholder after Head.swf as they both have parts with same class names. Will there be a way to overwrite an existing asset with same class name?

I hope to have some light and suggestions on this. Thanks!
