Flash Player 6 code not working in Flash Player 10

I would like to know how the following ActionScript, that only works in Flash Player 6, can be updated to work in a Flash Player 10 file.

The code comes from a tutorial at http://www.tutorial4me.com/rotating_menu.php

As it says, “On Publish Settings set Flash Player version on Flash Player 6, or this movie will not work.”

It works fine published as FP6 but not as FP10 as I need it to be. Thanks

This AS is added to a movie symbol that contains a button for a rotating menu effect.

onClipEvent (load) {
hx = 300/2;
hy = 400/2;
r = 100;
a = 30;
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(40);
range = ((p+72)*Math.PI)/180;
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();
}