Trying to covert kirupa snow to as3

hi am trying to convert this to as3

http://www.kirupa.com/developer/flash8/snow.htm

I think I am getting close, below is what I have so far can anyone help?

init = function () {
width = 300;
// pixels
height = 200;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 50;
// quantity

var snowArray:Array = new Array();

for (i=0; i<snowflakes; i++)
{

var myflake = new snow();
addChild(myflake);

    myflake.alpha = 20+Math.random()*60;
    myflake.x = -(width/2)+Math.random()*(1.5*width);
    myflake.y = -(height/2)+Math.random()*(1.5*height);
    myflake.scaleX = myflake.scaleY=50+Math.random()*(max_snowsize*10);
    myflake.k = 1+Math.random()*2;
    myflake.wind = -1.5+Math.random()*(1.4*3);
    myflake.addEventListener(Event.ENTER_FRAME, mover);
    
}

};

function mover(event:Event) {

myflake.y += this.k;
myflake.x += this.wind;
if (myflake.y>height+10) {
myflake.y = -20;
}
if (myflake.x>width+20) {
myflake.x = -(width/2)+Math.random()(1.5width);
myflake.y = -20;
} else if (myflake.x<-20) {
myflake.x = -(width/2)+Math.random()(1.5width);
myflake.y = -20;
}
}
init();