Hey, I got a crazy idea! Wouldn't be great if you could add background music to your games in a real simple way.
For example by describing the music by a few words, like "mysterious forrest" or "stress"?
Well, it turns out that I have constructed a thing I call the Music Generator that allows you to do exactly these things.
Let's try it out
Type the following into the the box where it says Enter source code here:
Click Check source code.
So what is happening here?
The function setMusicPremiss() takes one argument, a string containing words that describes the desired music. The function startMusic() will start the music when called.
You can call the function stopMusic() when you want to stop the music.
Now, for fun. Try this: