If statements shouldn’t have a ;
after them. ;
means ‘end of statement’ - since you have brackets { }
with your if
you don’t want that - the following line effectively says ‘if space bar is pressed… end if and do nothing’:
if (Input.check(Key.SPACE)); //don't want this, this does nothing
{
//this code will get executed every time, it's effectively outside of the if statement
}
if (Input.check(Key.SPACE)) //that's better
{
//this obeys the if as expected :D
}
So the code you have with the ;
after the if effectively ignores the if and changes world every time.
As for the blank screen, that definitely sounds like a Java problem. Uninstall FlashDevelop, Install the 32-bit Java Runtime from http://www.java.com/en/download/manual.jsp, then reinstall FlashDevelop. And yeah, you definitely want the 32-bit version of Java; FlashDevelop doesn’t work correctly with the 64-bit version, so save some headaches and get the 32-bit version even if you have a 64-bit OS!