# Attaching a movie clip to another -- dynamically?

**URL:** <https://forum.kirupa.com/t/attaching-a-movie-clip-to-another-dynamically/190534>\
**Category:** flash\
**Created:** [June 12, 2006, 7:00pm UTC](https://forum.kirupa.com/t/attaching-a-movie-clip-to-another-dynamically/190534 "2006-06-12T19:00:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tetraconz](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@tetraconz](https://forum.kirupa.com/u/tetraconz)\
**Post date:** [June 12, 2006, 7:00pm UTC](https://forum.kirupa.com/t/attaching-a-movie-clip-to-another-dynamically/190534/1 "2006-06-12T19:00:23Z")

</div>

I have a situation where I have a parent object that I want to act as a container for any number of dynamically generated child objects. Using the attachMovie() command however, it seems to require a linkage ID, which I will not have since I am creating new child objects on the fly, each with their own properties that I want to be persistent inside the parent container.

In pseudo-code, what I’d like to do is:

[FONT=Courier New]when user clicks a button {[/FONT]  
[FONT=Courier New]create new child object, named child1, child2, etc[/FONT]  
[FONT=Courier New]}[/FONT]

[FONT=Courier New][/FONT]  
[FONT=Courier New]user can drag any child object[/FONT]  
[FONT=Courier New][/FONT]

[FONT=Courier New]when user drags any child onto the parent {[/FONT]  
[FONT=Courier New]child is attached, so that it “sticks” to the parent container, and any properties of the parent are inherited by the children.[/FONT]  
[FONT=Courier New]}[/FONT]

Any thoughts?
