# Dynamic movieclip position on window resize

**URL:** <https://forum.kirupa.com/t/dynamic-movieclip-position-on-window-resize/283277>\
**Category:** flash\
**Created:** [March 4, 2009, 1:10pm UTC](https://forum.kirupa.com/t/dynamic-movieclip-position-on-window-resize/283277 "2009-03-04T13:10:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ex8roS](https://avatars.discourse-cdn.com/v4/letter/e/b2d939/32.png) [@Ex8roS](https://forum.kirupa.com/u/Ex8roS)\
**Post date:** [March 4, 2009, 1:10pm UTC](https://forum.kirupa.com/t/dynamic-movieclip-position-on-window-resize/283277/1 "2009-03-04T13:10:00Z")

</div>

So i am trying to have a moviclip on the top right corner of the flash movie no matter the size of the window like [here](http://page-flip-tools.com/demo/index2.php?option=com_flippingbook&view=book&id=3:catalog&catid=1:default-category&tmpl=component).

It works in the swf file but not in the html.

The top right movieclip’s position is set to

```auto

toggleFullScreenButton._y = 0;
toggleFullScreenButton._x = Stage.width-toggleFullScreenButton._width;

```

and it changes on resize to

```auto

new Tween(toggleFullScreenButton, "_x", Regular.easeOut, toggleFullScreenButton._x, Stage.width-toggleFullScreenButton._width, 10, false);

```

Also it only works when the stage align is set to TL, but that caused another problem, i can’t center the other movie clips.

I tried centering them with

```auto
movieclipname._x = Stage.width/2 - movieclipname._width/2;

```

but it didn’t work.

You can check the test page i am trying this on [here](http://pro.digimedia.gr/flipper/)
