Is there anything with which i can check if lets say "space" key goes up, so not to check wether its down, i just want to get one input, not many as in Greenfoot.isKeyDown();
Use the Greenfoot method 'getKey', assign the returned value to a String variable. Compare the value of the variable to expected key using, for example:
String key = Greenfoot.getKey();
if ("space".equals(key)) { /** etc */
Never compare in the opposite order -- like 'key.equals("space")' -- unless you check to make sure that 'key != null' first or that ol' NullPointerException will show its face.
If you only have to check for one key, you can use 'if ("space".equals(Greenfoot.getKey()))', otherwise you will need the string because once called the key is removed from the buffer and you cannot get it back again.
Pointifix wrote...
another question, how can i make one pixel transparent?
Use the GreenfootImage method 'setColorAt'. I normally use 'new java.awt.Color(0, 0, 0, 0)' for transparent.