
-----------------------------------
Shainman
Mon Jan 14, 2008 9:01 pm

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 :D

-----------------------------------
Tony
Mon Jan 14, 2008 9:33 pm

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?

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.

-----------------------------------
Shainman
Mon Jan 14, 2008 9:39 pm

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

-----------------------------------
Tony
Mon Jan 14, 2008 9:47 pm

RE:Music.PlayFile trouble Please help Final Project due tomorrow
-----------------------------------
so why not simply

procedure music
   Music.PlayFile ("Movie Themes - James Bond 007 (Original).mp3")  
   Music.PlayFileStop
end music


-----------------------------------
Shainman
Mon Jan 14, 2008 10:13 pm

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?

-----------------------------------
Tony
Mon Jan 14, 2008 10:41 pm

RE:Music.PlayFile trouble Please help Final Project due tomorrow
-----------------------------------
yes, call Music.PlayFileStop when you want your music to stop.

-----------------------------------
Shainman
Mon Jan 14, 2008 10:56 pm

Re: Music.PlayFile trouble Please help Final Project due tomorrow
-----------------------------------
Thanks Tony if it wasnt for you i would never get my project done :D  :D  :D  :D  :mrgreen:
