Here is a good way to move your object in all directions very easily.
PHP Code:
//#CLIENTSIDE // Makes events all processed on the client comp
function onCreated() //Action is called when script is read
{
disAbleDefMovement(); //Disables Default movement for player
}
function onKeyPressed( code, char) //Called when ever the client pushes a key on the keyboard
{
k = code; //make k equal the code number of what ever key is pushed
player.x += (( k == 39) - ( k == 37))/16; // if k equals number, it is 1, if not it is 0
//so if the player pushes left arrow it be player.x += 0 - 1;
player.y += (( k == 40) - ( k == 38))/16; //same as above just on the y-axis
}