Did you check to make sure 'released' was set to true?
MouseInfo mi = Greenfoot.getMouseInfo(); int btn = mi.getButton(); if (btn== 1) { System.out.println("Left mouse clicked"); if (released) { System.out.println("released is true") leftClicked = true; released = false; } } if (btn == 3) { rightClicked = true; }