I need help converting this from AS 2 to AS3.


stop();

var curr:Number = 0;

var score:Number = 0;

var nint:Number;

char.onEnterFrame = function() {
dx = this._x-_xmouse;
this._x -= dx/3;

if (this._x>370) {
this._x = 370;
}
if (this._x<30) {
this._x = 30;
}
};

function crObject(root:MovieClip) {
falling = Math.round(Math.random()*1);
curr++;
falling_mc = (falling == 0) ? "drop1" : "drop2";
objmc = root.attachMovie(falling_mc, "object"+curr, 1024+curr);
objmc._x = Math.round(Math.random()*340)+30;
objmc._y = -20;
objmc.fstep = 1;
objmc.falling = falling;
objmc._xscale = objmc._yscale=Math.round(Math.random()*50)+50;
objmc.onEnterFrame = function() {
this._y += this.fstep;
this.fstep += 0.1;
this._rotation += 0;//sets rotation of drops if desired//
if (this.hitTest(root.char) == true) {
switch (this.falling) {
case 0 :
score += 10;
if (score >= 100) {
clearInterval(nint);
root.gotoAndStop("gameover");

}
break;
}
score_txt.text = String(score);
this.removeMovieClip();
}
if (this._y>450) {
this.removeMovieClip();
}
};
}


nint = setInterval(crObject, 1000, this);
curr++;
score_txt.text = String(score);