For movement, you can use:
int x;
int y;
y=getY();
if(Greenfoot.isKeyDown(right)){
x=x+10;
setLocation(x,y); }
if(Greenfoot.isKeyDown(left)){
x=x-10;
setLocation(x,y); }
Also, can I reject an object from another object? - you can use the following code to do this:
Actor obj=getOneIntersectingObject(Object.class);
if(obj!=null && Greenfoot.isKeyDown(left)){
move(10); }
if(obj!=null && Greenfoot.isKeyDown(rigth)){
move(-10); }