Converting from MX to 8

I dont know how to make this work in F8, what syntax do I change?

Any help would be very welcomed :slight_smile:

onClipEvent (load) {
    hx = 800/2;   // Centre of circular path
    hy = 400/2;
    r = 100;   // Width of Rotation
    a = 30;    // Depth of Rotation
    function speed(num) {
        speedX = -(_root._xmouse-hx)/num;
        return speedX;
    }
    function trans() {
        p += speed(60);  //Speed - Higher the number, slower the speed
        range = ((p+308)*Math.PI)/180;  // Range -(p+'x') X is variable
        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();
}