Actionscript 1.0 to Actionscript 2.0 conversion, Help!

Hi guys,
Straight to the point. I found this skewing prototype in laco tweener web. And it was in actionscript 1.0 can u convert this code so its compatible with flash8 & actionscript 2.0 please? I can’t seem to know what’s wrong in here that I cant play it in as2.

var mp = MovieClip.prototype;
mp.setXskew = function(value) {
var _xskew = value;
//this._xskew = value;
//
var _yskew = this._yskew;
// add properties to movieclip
if (!this.inner_mc) {
// defines inner_mc clip needed to skew
for (var clips in this) {
if (typeof (this[clips]) == “movieclip”) {
this.inner_mc = this[clips];
// finds first movieclip and uses it to skew
break;
}
}
if (!this.inner_mc) {
return trace(“No interior clip for skewing found in “+this._name+”.”);
// error if inner not found
} else {
this.inner_mc._rotation = -45;
}
// assure clip is rotated -45 degrees
}
var toRads = Math.PI/180;
// converts degrees to radians
var xr = _xskewtoRads;
// skew in radians
var yr = _yskew
toRads;
var cosxr = Math.cos(xr);
// cosine of skew
var cosyr = Math.cos(yr);
this._rotation = 45+(_xskew+_yskew)/2;
// rotate this clip accordingly
var div = Math.sin(this._rotationtoRads).707106781186547;
//div: divisor - sin rotation sin 45 degrees;
if (!div) {
div = .0000001;
}
// prevents dividing by 0 which you just… cant… do
this._xscale = 100
(Math.sin(yr)+cosxr)/div;
// scaling for skew
this._yscale = 100*(Math.sin(xr)+cosyr)/div;
this.inner_mc._yscale = this.inner_mc._xscale=50/cosyr;
// scaling inner to maintain width/height
// = base_yscale*.5/cosxr;
};
ASSetPropFlags(mp, “setXskew”, 1, 0);
//
mp.getXskew = function() {
return this._xskew;
};
ASSetPropFlags(mp, “getXskew”, 1, 0);
//
mp.setYskew = function(value) {
var _xskew = this._xskew;
//
var _yskew = value;
//this._yskew = value;
// add properties to movieclip
if (!this.inner_mc) {
// defines inner_mc clip needed to skew
for (var clips in this) {
if (typeof (this[clips]) == “movieclip”) {
this.inner_mc = this[clips];
// finds first movieclip and uses it to skew
break;
}
}
if (!this.inner_mc) {
return trace(“No interior clip for skewing found in “+this._name+”.”);
// error if inner not found
} else {
this.inner_mc._rotation = -45;
}
// assure clip is rotated -45 degrees
}
var toRads = Math.PI/180;
// converts degrees to radians
var xr = _xskewtoRads;
// skew in radians
var yr = _yskew
toRads;
var cosxr = Math.cos(xr);
// cosine of skew
var cosyr = Math.cos(yr);
this._rotation = 45+(_xskew+_yskew)/2;
// rotate this clip accordingly
var div = Math.sin(this._rotationtoRads).707106781186547;
//div: divisor - sin rotation sin 45 degrees;
if (!div) {
div = .0000001;
}
// prevents dividing by 0 which you just… cant… do
this._xscale = 100
(Math.sin(yr)+cosxr)/div;
// scaling for skew
this._yscale = 100*(Math.sin(xr)+cosyr)/div;
this.inner_mc._yscale = this.inner_mc._xscale=50/cosxr;
// scaling inner to maintain width/height
//
};
ASSetPropFlags(mp, “setYskew”, 1, 0);
//
mp.getYskew = function() {
return this._yskew;
};
ASSetPropFlags(mp, “getYskew”, 1, 0);
//
mp.addProperty("_xskew", mp.getXskew, mp.setXskew);
ASSetPropFlags(mp, “_xskew”, 1, 0);
mp.addProperty("_yskew", mp.getYskew, mp.setYskew);
ASSetPropFlags(mp, “_yskew”, 1, 0);
delete mp;


and here’s the code for the press button.
#include “lmc_tween.as”
//
skew_btn.onPress = function() {
squares_mc_xskew = random(180);
squares_mc.tween("_xskew", squares_mc_xskew, 1, ‘easeInOut’);
//
squares_mc_yskew = 180;
squares_mc.tween("_yskew", squares_mc_yskew, 1);
};


Thanks in advance!