Music help in a procedure
Author |
Message |
INFERNO2K
![](http://members.rogers.com/mtrain2k/misc/tiesto_avatar.jpg)
|
Posted: Thu Jun 05, 2003 6:38 pm Post subject: Music help in a procedure |
|
|
code: | procedure playsong
put "What song would you like to listen to?"
put "1: Master of Puppets"
put "2: All Along the Watchtower"
put "3: E1M1"
get song
if song = "1" then
Music.PlayFile ("mop.mid")
elsif song = "2" then
Music.PlayFile ("watchtower.mid")
elsif song = "3" then
Music.PlayFile ("e3m3.mid")
end if
end playsong
playsong |
After the user selects a song I want my program to carry on instead of playing the entire song before continuing. How might I be able to do so? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
AsianSensation
|
Posted: Thu Jun 05, 2003 6:41 pm Post subject: (No subject) |
|
|
use process, look it up under the turing reference/help manual, it allow you to play background music. |
|
|
|
|
![](images/spacer.gif) |
INFERNO2K
![](http://members.rogers.com/mtrain2k/misc/tiesto_avatar.jpg)
|
Posted: Thu Jun 05, 2003 6:43 pm Post subject: (No subject) |
|
|
Im not quite sure of what the code would look like. |
|
|
|
|
![](images/spacer.gif) |
AsianSensation
|
Posted: Thu Jun 05, 2003 6:46 pm Post subject: (No subject) |
|
|
there is a tutorial on the help section, but ok, i'll give u the code anyway.
first, declare a process
code: |
process BackGroundMusic1
loop
Music.PlayFile ("mop.mid")
end loop
end BackGroundMusic
|
when you want to play it, use fork
code: |
if song = "1" then
fork BackGroundMusic1
elsif song = "2" then
fork BackGroundMusic2
elsif song = "3" then
fork BackGroundMusic3
end if
|
and that should allow u to play music in the background. |
|
|
|
|
![](images/spacer.gif) |
INFERNO2K
![](http://members.rogers.com/mtrain2k/misc/tiesto_avatar.jpg)
|
Posted: Thu Jun 05, 2003 6:51 pm Post subject: (No subject) |
|
|
Awsome it worked. Cheers ![Very Happy Very Happy](http://compsci.ca/v3/images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|