# Aligning variable sized objects and objects inside them

**URL:** <https://forum.kirupa.com/t/aligning-variable-sized-objects-and-objects-inside-them/192555>\
**Category:** flash\
**Created:** [June 29, 2006, 11:47am UTC](https://forum.kirupa.com/t/aligning-variable-sized-objects-and-objects-inside-them/192555 "2006-06-29T11:47:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saevik](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saevik](https://forum.kirupa.com/u/saevik)\
**Post date:** [June 29, 2006, 11:47am UTC](https://forum.kirupa.com/t/aligning-variable-sized-objects-and-objects-inside-them/192555/1 "2006-06-29T11:47:08Z")

</div>

Hi,

How do I align a movieclip, which width and height is user-defined, inside another object (this one is static, though). Top-left alignment is easy, x=0 and y=0, but what about center, center left, bottom left, etc? [COLOR=blue]Math(.round)[/COLOR] i suppose, but how?

and

I want an object (static) inside the movieclip (user-defined) to stay aligned to, for instance, the top right corner, similiar to the minimize, maximize and close buttons at the top right of your browser…

The height and width data is pre-defined by the user in another file… But that does probably not make any difference…

If anyone could help me with this, I’d appreciate it alot! :pleased:

Thanks!,  
Peter
