Computer Science Canada

stop fork? music

Author:  marshymell0 [ Mon Mar 28, 2005 1:22 pm ]
Post subject:  stop fork? music

hey, I have a program. It goes like this
process music
code:

loop
Music.Playfile
end loop
end music

When my program gets to a certain page, I type fork music. to play the music while the user is reading the page. But when the user is done on that page where music starts, he or she clicks "e" to go back to the page before. What I want to know is how to stop the music once the user exits the page in which the music starts. If I
code:

loop
Music.Playfile
exit when hasch="e"
end loop
end music

it doesn't work. So is there anyway to do this? or should I just play the music once and hope the user spends the same amount of time on the page with the music before going back to the main menu? thx[/code]

Author:  jamonathin [ Mon Mar 28, 2005 1:46 pm ]
Post subject: 

always check the help section in turing too, (f10), theres a command there ment for stopping music. I believe it's
code:
Music.PlayFileStop
Confused

Author:  person [ Mon Mar 28, 2005 4:21 pm ]
Post subject: 

Music.SoundOff also works

btw: F10 is ur best friend

Author:  Naveg [ Mon Mar 28, 2005 5:47 pm ]
Post subject: 

if its a file dont you have to use FileStop?

Author:  Mr. T [ Mon Mar 28, 2005 6:09 pm ]
Post subject: 

or u could use a boolean and be pro Smile

Author:  Token [ Mon Mar 28, 2005 7:46 pm ]
Post subject: 

lol Pwned you with your boolean Laughing, although boolean may be pro, your running a process and to have it constantly checking an if statement will slow down your program.

Author:  marshymell0 [ Mon Mar 28, 2005 8:26 pm ]
Post subject: 

yes I know about Music.PlayFileStop Very Happy
but there is nowhere to put it, I put it in the loop
code:

process music
loop
Music.Playfile
exit when key="e"
MusicPlayStop
end loop
end music
fork music
loop
a bunch of code
exit when key="e"
end loop

but in that process, it never gets the input "e" for some reason, and if you put the MusicPlayFileStop at the end of the last loop, it doesn't understand because it's not really part of the loop -.-

Author:  Mr. T [ Mon Mar 28, 2005 8:29 pm ]
Post subject: 

thats because your exiting the loop before you can get to MusicPlayFileStop, so its being skipped over


: