The objective of the game is to make the ship reach the treasure with the mouse pointer. When you hit the island you lose. Press the flag to play again.
What I used to make this game is from a book called "CODE YOUR OWN GAMES!".