Computer Science Canada Music.PlayFile trouble Please help Final Project due tomorrow |
Author: | Shainman [ Mon Jan 14, 2008 9:01 pm ] |
Post subject: | Music.PlayFile trouble Please help Final Project due tomorrow |
Hi back again and i seriously need help on this one. I have to make a game for my grade 9 final project, and its due tomorrow. This time my troubles come from Music.PlayFile. heres my code for it process music if finished = false then Music.PlayFile ("Movie Themes - James Bond 007 (Original).mp3") else if finished = true then Music.PlayFileStop end if end if end music fork music var finished is set as a boolean and false, and it is called true when my final screen is to appear, however the music doesnt stop, is there any way to make it stop. Please help as soon as u can Thank You ![]() |
Author: | Tony [ Mon Jan 14, 2008 9:33 pm ] | ||
Post subject: | RE:Music.PlayFile trouble Please help Final Project due tomorrow | ||
you need to step through your logic, there are a couple of mistakes. 1. How often does your program check finished = true line? 2. How long does it take for the Music.PlayFile to execute?
Look into Music.PlayFileReturn, loops, and other help topics with similar (actually same) questions. |
Author: | Shainman [ Mon Jan 14, 2008 9:39 pm ] |
Post subject: | Re: Music.PlayFile trouble Please help Final Project due tomorrow |
the file is about 1:44 in length. and i put finished = true only in one spot, because i only need it to stop at the end of the program |
Author: | Tony [ Mon Jan 14, 2008 9:47 pm ] | ||
Post subject: | RE:Music.PlayFile trouble Please help Final Project due tomorrow | ||
so why not simply
|
Author: | Shainman [ Mon Jan 14, 2008 10:13 pm ] |
Post subject: | Re: Music.PlayFile trouble Please help Final Project due tomorrow |
it for my final project so when the person presses quit, the user gets a goodbye screen and then the window closes. I need the music to stop when the window closes. anyway to do that? |
Author: | Tony [ Mon Jan 14, 2008 10:41 pm ] |
Post subject: | RE:Music.PlayFile trouble Please help Final Project due tomorrow |
yes, call Music.PlayFileStop when you want your music to stop. |
Author: | Shainman [ Mon Jan 14, 2008 10:56 pm ] |
Post subject: | Re: Music.PlayFile trouble Please help Final Project due tomorrow |
Thanks Tony if it wasnt for you i would never get my project done ![]() ![]() ![]() ![]() ![]() |