This site requires JavaScript, please enable it in your browser!
Greenfoot back

Busch2207's Comments

Back to Busch2207's profile

Of course! :) You can use any code, you need! ;)
@ 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! :)
Maybe try to restart your browser. That always works for me! :)
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. ;)
(I mean before the colored polygons were added! :) )
In my opinion it looked much better, before the last update.
Ah, ok! :D Beginner and Intermediate! ^^ :)