# Auto-Resizing and Centering movie

**URL:** <https://forum.kirupa.com/t/auto-resizing-and-centering-movie/304791>\
**Category:** flash\
**Created:** [February 14, 2010, 12:16am UTC](https://forum.kirupa.com/t/auto-resizing-and-centering-movie/304791 "2010-02-14T00:16:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvita](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@cvita](https://forum.kirupa.com/u/cvita)\
**Post date:** [February 14, 2010, 12:16am UTC](https://forum.kirupa.com/t/auto-resizing-and-centering-movie/304791/1 "2010-02-14T00:16:50Z")

</div>

Ok so I saw this tutorial [http://www.kirupa.com/developer/as3/resizing\_centering\_as3.htm](http://www.kirupa.com/developer/as3/resizing_centering_as3.htm)

but I need to make that in Action Script 2.0

I’ve find the code for the same thing:

\*\*//Pursuant to the tutorial example here is the AS2 conversion:  
INIT\_Stage();  
StageResize();

//////////////////////////////////////// | INIT\_Stage();  
function INIT\_Stage() {  
Stage.align = “TL”;  
Stage.scaleMode = “noScale”;  
}  
//////////////////////////////////////// | StageResize();  
function StageResize():Void {  
ObjectTopLeft(backgroundRectangle);  
ObjectFullStage(backgroundRectangle);  
ObjectCenterStage(centerRectangle);  
}  
//////////////////////////////////////// |  
var StageListener:Object = new Object();  
StageListener.onResize = function():Void {  
StageResize();  
updateAfterEvent();  
}  
Stage.addListener(StageListener);\*\*

but it still doesn’t work. I have named the instances centerRectangle and backgroundRectangle, worked in one frame and three layers. I don’t know what is the problem? Please can you help?
