AS2 -> AS3

Hey guys,

I'm trying to convert an old AS2 game into AS3 but I'm having some trouble. I'm quite new to flash so I'm sure some of this to you guys might be easy but this is what I've got so far:

onClipEvent (load) {
power = 0.3;
yspeed = 0;
xspeed = 0;
friction = 0.95;
gravity = 0.1;
thrust = 0.75;
}

onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
xspeed -= power;
}
if (Key.isDown(Key.RIGHT)) {
xspeed += power;
}
if (Key.isDown(Key.UP)) {
yspeed -= power*thrust;
}
if (Key.isDown(Key.DOWN)) {
yspeed += power*thrust;
}
xspeed *= friction;
yspeed += gravity;
y += yspeed;
x += xspeed;

if (_root.wall.hitTest(x, y, true)) {
xspeed = 0;
yspeed = 0;
x = 261.0;
y = 330.0;
}

if (root.testObject.hitTest(x, y, true)) {
gotoAndPlay(25);
}
}

So, all the underscores have been taken out from _root, _x and _y. Also, I understand that there is now no Key class, but what has this been replaced with? And I think I need to replace the onClipEvent stuff with addEventListener, but if I do this, what now goes in place of (enterFrame)?

Thanks guys, any help would be greatly appreciated.
character movement
listeners

Original thread: https://box2d.org/forum/viewtopic.php?t=2474