@ Builderboy:
I recognized, you wrote
new Thread() {
public void run() {
channel[instrument].noteOn(note, volume);
try {
Thread.sleep(0);
}
catch(InterruptedException ex) {}
finally {
channel[instrument].noteOff(note,50);
}
}
}.run();
in the MidiPlayer-class.
May you meant '}.start();' at the end? Because this Thread is a useless created object, isn't it?
In older Java-versions 'Greenfoot.getKey() == "space"' always returned wrong.
But in the current version, this will return true, if both strings are the same! :)
He wrote:
UserInfo.getMyInfo().getUserImage()
and sometimes, when you're not logged in or when there's a login-mistake, UserInfo.getMyInfo() returns 'null' and then an error occures! :)
@FlyingRabidUnicornPig:
I don't see any problem with the getKey method:
He wrote: 'Greenfoot.getKey() == "space"' and if getKey() returns 'null', this query will return false, because this only checks, whether this two inputs are the same!
He hasn't written 'Greenfoot.getKey().equals("space")', which would throw an error, when 'getKey()' returns 'null', because then, the compiler trys to run the method from an object, which don't exists. ;)
2013/10/12
Loading and saving files
2013/10/9
Animusic
2013/10/7
Negative Color
2013/10/6
Negative Color
2013/10/6
Negative Color
2013/10/6
Negative Color
2013/10/6
Viral Spiral
2013/10/6
Viral Spiral
2013/9/27
Base Defense