# Adding same object twice with addchild

**URL:** <https://forum.kirupa.com/t/adding-same-object-twice-with-addchild/312798>\
**Category:** Uncategorized\
**Created:** [August 12, 2010, 10:33pm UTC](https://forum.kirupa.com/t/adding-same-object-twice-with-addchild/312798 "2010-08-12T22:33:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![McLucky](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@McLucky](https://forum.kirupa.com/u/McLucky)\
**Post date:** [August 12, 2010, 10:33pm UTC](https://forum.kirupa.com/t/adding-same-object-twice-with-addchild/312798/1 "2010-08-12T22:33:17Z")

</div>

Hi,

I would like to add the same object to two different movie clips but flash wont let me…

Say I have movieclip1 and movieclip2, now I want to load an external picture and add it to both movieclips. Then the following code does not work :

```auto
var fullImageLoader:Loader = new Loader();

fullImageLoader.load(new URLRequest(imageArray[currentImage]))

var imageContainer:MovieClip = new MovieClip();

movieclip1.addChild(imageContainer);
movieclip2.addChild(imageContainer);

```

I found the following statement in the adobe livedocs:  
\*“If you add a child object that already has a different display object container as a parent, the object is removed from the child list of the other display object container. \*”  
([http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html](http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html))

I have tested this and it works that way.

```auto
movieclip1.addChild(imageContainer);
movieclip2.addChild(imageContainer);

```

Results in the image being added to movieclip2

```auto
movieclip2.addChild(imageContainer);
movieclip1.addChild(imageContainer);

```

Results in the image being added to movieclip1

My question is: how I can add the ImageContainer to both movieclips and manipulate them separately ?

Thanx !
