AS3 to AS2

I have a very basic knowledge on actionscripting. This is the code (adjusting the background image) i have found in one of the tutorials on net.

Since I am only able to work in AS1, AS2, I hope to have AS2 equilavent of this code.

I will appreciate a lot if it is possible.

Thanks

the code is:

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);

//function to handle background image resize.
function setBackground() {
var reg2 = stage.stageWidth / 2;
var reg1 = stage.stageHeight / 2;
bg_mc.x = reg2;
bg_mc.y = reg1;
bg_mc.width = stage.stageWidth;
bg_mc.height = stage.stageHeight;
bg_mc.scaleX <= bg_mc.scaleY ? (bg_mc.scaleX = bg_mc.scaleY) : (bg_mc.scaleY = bg_mc.scaleX);
base_mc.width = stage.stageWidth;
}
setBackground();
//set intitial position
function setPos() {
message_mc.x = stage.stageWidth / 2;
message_mc.y = stage.stageHeight / 2;
base_mc.x=0;
base_mc.y=stage.stageHeight-70;
controls_mc.x=0;
controls_mc.y=stage.stageHeight-70;
logo_mc.x=stage.stageWidth-300;
logo_mc.y=0;
}
setPos();
//set position when stage resizes
function resizeHandler(event:Event):void {
setBackground();
setPos();