AS1 to AS2 conversion? Simple?

Hello all.

Iā€™m trying to convert this PONG code so I can load this into an AS2 swf site. Anyone have any recommendations on where I could go to brush up on my AS1 :slight_smile: it looks so foreign to me compared to AS2/3!


onClipEvent (load) {
    xpos = _root.bal._x;
    ypos = _root.bal._y;
}
onClipEvent (enterFrame) {
    setProperty(this, _x, this._x + /:xspeed);
    setProperty(this, _y, this._y + /:yspeed);
    if (this._x >= _root.right._x and this._y >= _root.right._y - 25 and this._y <= _root.right._y + 25) {
        _root.bal._x = _root.bal._x-(_root.bal._x-_root.right._x);
        /:xspeed = -/:xspeed - 0.2;
        /:hits1 = /:hits1 + 1;
    }
    if (this._x <= _root.left._x and this._y >= _root.left._y - 25 and this._y <= _root.left._y + 25) {
        _root.bal._x = _root.bal._x + (_root.left._x - _root.bal._x);
        /:hits2 = /:hits2 + 1;
        /:xspeed = -/:xspeed;
    }
    if (this._y < _root.top._y) {
        /:yspeed = -/:yspeed;
    }
    if (this._y >_root.bottom._y) {
        /:yspeed = -/:yspeed;
    }
    if (this._x >= _root.right._x + 12) {
        /:misses1 = /:misses1 + 1;
        /:xspeed = 0;
        /:yspeed = 0;
        setProperty("/bal", _x, xpos);
        setProperty("/bal", _y, ypos);
    }
    if (this._x <= _root.left._x - 12) {
        /:misses2 = /:misses2 + 1;
        /:xspeed = 0;
        /:yspeed = 0;
        setProperty("/bal", _x, xpos);
        setProperty("/bal", _y, ypos);
    }
}