Author |
Message |
Shainman
|
Posted: 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 ![Very Happy Very Happy](http://compsci.ca/v3/images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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?
code: |
put "starting"
Music.PlayFile ("Movie Themes - James Bond 007 (Original).mp3")
put "done"
|
Look into Music.PlayFileReturn, loops, and other help topics with similar (actually same) questions. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Shainman
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Mon Jan 14, 2008 9:47 pm Post subject: RE:Music.PlayFile trouble Please help Final Project due tomorrow |
|
|
so why not simply
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Shainman
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Shainman
|
Posted: 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 ![Mr. Green Mr. Green](images/smiles/icon_mrgreen.gif) |
|
|
|
|
![](images/spacer.gif) |
|