# Two questions on .createEmptyMovieClip()

**URL:** <https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409>\
**Category:** flash\
**Created:** [March 26, 2006, 8:38pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409 "2006-03-26T20:38:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soulberry](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Soulberry](https://forum.kirupa.com/u/Soulberry)\
**Post date:** [March 26, 2006, 8:38pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409/1 "2006-03-26T20:38:03Z")

</div>

Q1) The registration point of a created clip is top left - my question is how can I dynamically change it’s registration point - say to center center?

(I am trying to attach a movie clip to a created clip and I wanted it to be centered inside the container - a related sub-question, how can I find the x-y coordinates of the attached movie clip within the created movie clip?)

Q2)When I tried to create two different movie clips, I found I had to create them at different depths, else the first would load and the second would not. Why would that be so? I’m on MX 2004 Pro.

Thank you all.

soul

---

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [March 26, 2006, 8:45pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409/2 "2006-03-26T20:45:32Z")

</div>

> When I tried to create two different movie clips, I found I had to create them at different depths, else the first would load and the second would not. Why would that be so? I’m on MX 2004 Pro.

Flash dont like it when there are 2 things at the same depth. He starts killing stuff…

---

<div class="post-metadata">

**Author:** ![Soulberry](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Soulberry](https://forum.kirupa.com/u/Soulberry)\
**Post date:** [March 26, 2006, 9:04pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409/3 "2006-03-26T21:04:28Z")

</div>

> [@nathan99](#):
>
> Flash dont like it when there are 2 things at the same depth. He starts killing stuff…

Thanks Nathan. Please humor me, I’ve just started studying up AS, so there is a limit as to how many instances can be created at a particular depth?

Now, how about re-assigning co-ordinates of an instance I place within the created clip through the attach method. I have been able to attach a clip to the created one, but I want it to be aligned in the center. The default registration point for a created clip is top left. Can that be changed through scripting?

Thank you.  
s

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [March 26, 2006, 9:27pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409/4 "2006-03-26T21:27:41Z")

</div>

> [@Soulberry](#):
>
> Thanks Nathan. Please humor me, I’ve just started studying up AS, so there is a limit as to how many instances can be created at a particular depth?

Yes, the limit is one 🙂

> [@Soulberry](#):
>
> Now, how about re-assigning co-ordinates of an instance I place within the created clip through the attach method. I have been able to attach a clip to the created one, but I want it to be aligned in the center. The default registration point for a created clip is top left. Can that be changed through scripting?

You’ll have to offset the content of the empty movie clip.

---

<div class="post-metadata">

**Author:** ![Soulberry](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Soulberry](https://forum.kirupa.com/u/Soulberry)\
**Post date:** [March 26, 2006, 10:30pm UTC](https://forum.kirupa.com/t/two-questions-on-createemptymovieclip/183409/5 "2006-03-26T22:30:06Z")

</div>

OK…you mean, I set the position by something like this -

\_root.createdMovieClip.attachedMovieClip.\_x = someValue for x;  
\_root.createdMovieClip.attachedMovieClip.\_y = someValue for y;  
?

I’ll try this.

Thank You.  
s
