Dynamic movieclip position on window resize

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.

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

The top right movieclip’s position is set to


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

and it changes on resize to


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

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