# Reparenting an image after its loaded

**URL:** <https://forum.kirupa.com/t/reparenting-an-image-after-its-loaded/241329>\
**Category:** flash\
**Created:** [October 12, 2007, 8:25am UTC](https://forum.kirupa.com/t/reparenting-an-image-after-its-loaded/241329 "2007-10-12T08:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sixfngers](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sixfngers](https://forum.kirupa.com/u/sixfngers)\
**Post date:** [October 12, 2007, 8:25am UTC](https://forum.kirupa.com/t/reparenting-an-image-after-its-loaded/241329/1 "2007-10-12T08:25:17Z")

</div>

So I have a loader that is loading in an image file.  
What I would like to do is reparent the image it loads to a movieclip or sprite after it is loaded so I can reuse it again. It works sort of. I can get the result I want but only if I don’t data type the mc variable.

this function appears in my loader class.

```auto

public function reparentContent(){
	var mc = _siteRef.getChildByName("reparentClip")
	mc.addChild(_loader)
}

```

If I dataType the mc variable I get this error:  
error 1118: Implicit coercion of a value with static type flash.display: DisplayObject to a possibly unrelated type flash.display:MovieClip.

If i don’t specify a data type it works as planned.

Any thoughts, or should I just not bother since it is working?
