# attachMovie fit and center into container

**URL:** <https://forum.kirupa.com/t/attachmovie-fit-and-center-into-container/318616>\
**Category:** flash\
**Created:** [January 25, 2011, 11:10am UTC](https://forum.kirupa.com/t/attachmovie-fit-and-center-into-container/318616 "2011-01-25T11:10:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kicker1810](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@kicker1810](https://forum.kirupa.com/u/kicker1810)\
**Post date:** [January 25, 2011, 11:10am UTC](https://forum.kirupa.com/t/attachmovie-fit-and-center-into-container/318616/1 "2011-01-25T11:10:41Z")

</div>

Hello!I’m new here so I want to salute everyone HY THERE!  
Now…the problem:  
I have a container in which I want to attachMovie a movieClip.I figured out how to resize the movieClip to fit the Container but what i want now is to make it be attached in the center of container.I can’t use the name.\_x = because the movieClip I want to attach is created via as after some values inputed by the user so i do not know where it’s registration point will be.  
I thought of using the name.\_width and name.\_height but as it is normal to be it’s always positive so I can’t figure if the registration point is in the top left corner or the bottom right corner or anywhere else.  
What I think I might need is to always set the registration point to the same spot.  
To explain better and shortly how it works: I attach a movieclip (dot) at x=0 y=0.then another one(a line) from x=0 y=0 at a certain angle imputed by the user and another line also with angle and length seted by user etc. so I do not know where they go from the 0;0 dot.  
Thanks in advance.
