# Position stuff relative to the Stage

**URL:** <https://forum.kirupa.com/t/position-stuff-relative-to-the-stage/215102>\
**Category:** open source\
**Created:** [February 4, 2007, 10:35am UTC](https://forum.kirupa.com/t/position-stuff-relative-to-the-stage/215102 "2007-02-04T10:35:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qgeis](https://avatars.discourse-cdn.com/v4/letter/q/76d3ee/32.png) [@Qgeis](https://forum.kirupa.com/u/Qgeis)\
**Post date:** [February 4, 2007, 10:35am UTC](https://forum.kirupa.com/t/position-stuff-relative-to-the-stage/215102/1 "2007-02-04T10:35:18Z")

</div>

Feel free to use these to help in positioning stuff relative to the Stage. Acts on the registration point of the object.

e.g. if you have a movieclip 200 pixels wide with a lefttop registration point, you have to subtract 200 from _rightEdge_ so it aligns nicely.

```auto
// Size of your flash canvas
var canvasWidth = 550;
var canvasHeight = 400;

var leftEdge = (canvasWidth/2)-(Stage.width/2);
var rightEdge = (canvasWidth/2)+(Stage.width/2);
var topEdge = (canvasHeight-Stage.height)/2;
var bottomEdge = Stage.height - ((Stage.height-canvasHeight)/2);
var centerScreen = (canvasWidth/2) - (menuWidth/2);

```

Hope this is useful especially for those who have been trying to achieve menus that stays on one side whenever the browser is resized.
