To get a sound file into your program, you first need to load it. After it is loaded, you can assign it to play at specific times. The following code will load a sound:
; Loading a sound sound = LoadSound (filename)
Obviously, you would replace filename with the actual name of your sound file. For example, in a video game with a blast, you might write:
blaster = LoadSound ("blaster.wav").
The sound part of the code is just a name we gave our sound; you can call your sounds anything you’d like.
Open the file called demo12-01.bb and save it to a new folder. Make sure that the file called blaster.wav is in the same folder. Follow along as we go through the code.
blaster = LoadSound ("blaster.wav")
The game that we have ...
No credit card required