Computer Science Canada music help |
Author: | Thuged_Out_G [ Thu Dec 25, 2003 1:25 am ] | ||
Post subject: | music help | ||
ok i have a few problems i cant figure out 1)the background doesnt seem to go black, any help? 2)i cant figure out how you can click more then one button, after i click one button it says program finished 3)is there a way to read the CD and find how many tracks are on it? |
Author: | AsianSensation [ Thu Dec 25, 2003 10:07 am ] | ||
Post subject: | |||
have your colorback command at the beginning, and cls to show the background color. the reason the button is only clicked once and the program is finished is because you only assigned it once. Declare all the variables outside the loop, and in the loop, assign the variables their respective value. That should work. lastly, unless you can somehow check to see how big of a file is each song from a CD with Turing, then I don't think you can tell how many songs are on there. |
Author: | Thuged_Out_G [ Thu Dec 25, 2003 3:31 pm ] |
Post subject: | |
thanks asian |
Author: | Thuged_Out_G [ Thu Dec 25, 2003 5:45 pm ] |
Post subject: | |
ok, everything works good except one thing the buttons dont work if a song is playing, is there any way around this? example, if i click track 1, i cant click another button until track 1 is finished |
Author: | AsianSensation [ Thu Dec 25, 2003 10:46 pm ] | ||||
Post subject: | |||||
I guess you have to set a flag or something to exit that procedure. right now, when you are playing a song, it will keep playing because it's not a process and doesn't happen simultaneously with the program. I don't know if you can put a process inside a GUI button, I'm not even sure you can put a process into a procedure. so there really is no way of stopping the song. btw, I think I might have a way to check to see how many song there are on the CD. since you are using strings for the path anyways, just add some string manipulation. instead of:
try this
maybe that would work? I'm assuming the Music.PlayFile returns false when there isn't anything to play. |
Author: | Thuged_Out_G [ Thu Dec 25, 2003 11:21 pm ] | ||||
Post subject: | |||||
i will try out the intstr, would it work something like this?
im not positive on how to make the song and the program run simultaneously....would it e something along these lines:
|
Author: | AsianSensation [ Fri Dec 26, 2003 1:55 pm ] | ||
Post subject: | |||
yep, intstr works like that. also, I'm not sure if you could substitute process for precedures when it comes to GUI. I suggest have an access procedure. like this:
something like that. and in your GUI buttons, just call the playsong1 procedure. Music.PlayFileStop is to stop all other music from playing when you are accessing the current song. btw, when running music simultaneously with the program, you don't need to fork the main line, there is no point in doing that. |
Author: | Thuged_Out_G [ Fri Dec 26, 2003 2:38 pm ] |
Post subject: | |
ok, thanks again asian |