# Class LayoutConstraint (senocular)

**URL:** <https://forum.kirupa.com/t/class-layoutconstraint-senocular/250931>\
**Category:** Uncategorized\
**Created:** [February 3, 2008, 5:50pm UTC](https://forum.kirupa.com/t/class-layoutconstraint-senocular/250931 "2008-02-03T17:50:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [February 3, 2008, 5:50pm UTC](https://forum.kirupa.com/t/class-layoutconstraint-senocular/250931/1 "2008-02-03T17:50:24Z")

</div>

anyone can help me with this?

to center a movieClip to center of stage using the layoutConstraint class i did the following:

[AS]var stageLayout:Layout = new Layout(stage);  
var layout:Layout;

layout = new Layout(my\_mc, true);

layout.verticalCenter = 0;  
layout.horizontalCenter = 0;

stageLayout.addChild(layout);  
stageLayout.draw();[/AS]

this works ok if my\_mc is static… but if i try to move or scale contents of my\_mc it will go wrong.

i’ve some animation going inside my\_mc, adding childs and make them move, just need my\_mc to be in the same location (based on the reference point)

can some one give me light?!  
:ear:

---

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [June 15, 2008, 10:35pm UTC](https://forum.kirupa.com/t/class-layoutconstraint-senocular/250931/2 "2008-06-15T22:35:11Z")

</div>

hey pensamente!  
i can see you after all this you haven’t learn a thing with this classes! still mad at you no?!

…really kirupa friends, you could help this guy. 😛  
maybe could merge threads since the last i made was in the same issue :s
