Hello its me again this is one more code
ok now it will point and move.
or else if you want to make it move when clicked in background, see Here.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo etc)
public class Object extends Actor
{
public void act()
{
MouseInfo pointer = Greenfoot.getMouseInfo();
if(pointer != null)
{
int mouseX = pointer.getX();
int mouseY = pointer.getY();
turnTowards(mouseX, mouseY);
move(10);
}
}
}