Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Music.Playfile Trouble While Running The Program.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Gackt




PostPosted: Thu Dec 20, 2007 5:15 pm   Post subject: Music.Playfile Trouble While Running The Program.

Ok, I'm having trouble playing My Music.Playfile while executing the program, ike the music plays but Nothing else will work, Is this because I only put in the Music.Playfile or something else? I;m not really sure how to fix this, it kinda stumped me, I looked at the tutorial that Dan posted but i Didnt really understand it. Thanks for your help.
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Thu Dec 20, 2007 5:18 pm   Post subject: RE:Music.Playfile Trouble While Running The Program.

It's working exactly as you coded it to. When you run Music.PlayFile(), the program will wait for the music to finish before continuing on. Look into Music.PlayFileReturn() instead.
HeavenAgain




PostPosted: Thu Dec 20, 2007 5:19 pm   Post subject: RE:Music.Playfile Trouble While Running The Program.

what alot of people do is process for background music, something like
code:
process bgmusic
loop
MusicPlayfile
end loop
end bgmusic
fork bgmusic

somewhat like that so it continues playing
so just fork it Rolling Eyes
Gackt




PostPosted: Thu Dec 20, 2007 5:47 pm   Post subject: RE:Music.Playfile Trouble While Running The Program.

Eh, Your Right, Thanks for your help, I got it working now.
questionableninja




PostPosted: Thu Jan 03, 2008 7:09 pm   Post subject: Re: RE:Music.Playfile Trouble While Running The Program.

HeavenAgain @ Thu Dec 20, 2007 5:19 pm wrote:
what alot of people do is process for background music, something like
code:
process bgmusic
loop
MusicPlayfile
end loop
end bgmusic
fork bgmusic

somewhat like that so it continues playing
so just fork it Rolling Eyes


yea i know this isn't my question but when i try to fork som music it works fine but i can't end the program even when the game is done Shocked
HeavenAgain




PostPosted: Thu Jan 03, 2008 7:28 pm   Post subject: RE:Music.Playfile Trouble While Running The Program.

simple, just add a boolean to keep track whenever you want to exit the music, say you have a boolean variable called flag and its false, now in your process bgmusic you just add "exit when flag", and make the flag true whenever you want to stop it Smile
questionableninja




PostPosted: Sat Jan 05, 2008 1:36 am   Post subject: Re: Music.Playfile Trouble While Running The Program.

thx man
ericfourfour




PostPosted: Sat Jan 05, 2008 9:03 pm   Post subject: Re: Music.Playfile Trouble While Running The Program.

For the sake of simplicity.

Play music: Music.PlayFileReturn("music_file_name")

Stop music: Music.PlayFileStop

From the Turing Documentation under the Music module.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: