Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 stop fork? music
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
marshymell0




PostPosted: 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]
Sponsor
Sponsor
Sponsor
sponsor
jamonathin




PostPosted: Mon Mar 28, 2005 1:46 pm   Post subject: (No 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
person




PostPosted: Mon Mar 28, 2005 4:21 pm   Post subject: (No subject)

Music.SoundOff also works

btw: F10 is ur best friend
Naveg




PostPosted: Mon Mar 28, 2005 5:47 pm   Post subject: (No subject)

if its a file dont you have to use FileStop?
Mr. T




PostPosted: Mon Mar 28, 2005 6:09 pm   Post subject: (No subject)

or u could use a boolean and be pro Smile
Token




PostPosted: Mon Mar 28, 2005 7:46 pm   Post subject: (No 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.
marshymell0




PostPosted: Mon Mar 28, 2005 8:26 pm   Post subject: (No 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 -.-
Mr. T




PostPosted: Mon Mar 28, 2005 8:29 pm   Post subject: (No subject)

thats because your exiting the loop before you can get to MusicPlayFileStop, so its being skipped over
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: