Computer Science Canada Music.SoundOff not working |
Author: | cutecotton [ Sun Jan 19, 2003 12:22 pm ] |
Post subject: | Music.SoundOff not working |
hi everyone, i have a process for my msuic which i need to put into my prgraom. so i forkedit ina nd it works, but i need it so that when the user clicks a button (which will lead to antoher screen), the music will turn off. So i put in a Music.SoundOff buti t keeps on playing hte song anyways. Any idea what's up with that? also, i have some sound effects files, like when the user types a word there will be a litlte sound, whenever that sound plays, the main song restarts itself after. Dotn' watn that happening...any ideas how to fix it? Also (kind aoff topic) but i need to make a timer..like the user has 30 seconds to type this word..i've tired clock and wallclock bu ti dotn' seemt o get it working..how do i make a countdown? tks again 4 ur helkp |
Author: | Tony [ Sun Jan 19, 2003 1:25 pm ] | ||
Post subject: | |||
for the music.soundoff... if your process has a loop then it might restart the song even after you turn it off. You gotta be careful about that. As for individual sounds, I think if you play some notes instead of loading another music file, it might not interfeir with the backgound music, but I'm not sure on that.
here's a working example of timer that counts down for 10 seconds then displays "time's up" while the user can type something... the only problem is that locate keeps on moving coursor, so for this to work properly you need to use getch() with a counter of how many characters were typed for proper output. It will get tricky once you want to use backspace |
Author: | cutecotton [ Sun Jan 19, 2003 10:08 pm ] |
Post subject: | |
hmm yeah i think teh msuic thing is cuz of the loop...pretty sure if i take it out of the loop it'll work. But see waht i don't know is wehther it'll make the song restart everytim ei load a Music.PlayFile Cuz right now i have it so taht when teh user types an error, a Music.PlayFile will play (liek a beep), but i thought my song woudl be able to play over it to. Since it is possible to have 2 songs playing at once right? not too sure if i watn to ues the note, that'll be last thing to do lol cuz i love my sound effects toomuch. Tks 4 the timer thing, i read through teh coding...and just wondering, what does a "boolean" do? |
Author: | Tony [ Sun Jan 19, 2003 10:51 pm ] |
Post subject: | |
boolean doesn't realy do anything in this example... it just cahnges to "True" once the time runs out... you can use it with Ifs or something. I'm not sure about mixing sounds together... to be honest I never used sound in my programs |