You have to maintain this part of the code, as it translates an 'x' and "y" positional value (forward movement) based on the rotation value you have accumulated.
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
It's really the core of positional translations based on direction. P.S. Bill Watson, i think I can use this for my issue also.
The 'x' & 'y' become temporary holders during the calculation. Review these two lines and make sure you understand what is accomplished. In your case speed is a constant (either 1 or 0), i assume your example person does not have a variable speed? Let your key depresses change speed from 0 to 1, and then the person starts to move in the current direction pointed to by 'rotation'