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

Username:   Password: 
 RegisterRegister   
 Turing music stop help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BlackfireSD




PostPosted: Wed Jun 03, 2009 12:23 pm   Post subject: Turing music stop help

What is the problem you are having?
trying to stop the music


Describe what you have tried to solve this problem
Music.PlayFileStop




Turing:


%                   Re: Dance Dance Turing Edition
% Rules: You will have to match the oncoming arrows with the arrow keys on top.
% You will be using all four arrow keys.
% Points are giving for 3 types of hits.
% A- Right on hit
% G- A bit off but still a hit
% B- Didnt hit the arrow or missed the arrow.

% Point ranks-(A-0 to 100,(AA-1001 to 2000),(AAA-2001 to 3000),(X-3000+)
% A list of music will be giving.
%
%Songs:
% Len Kagamine- Tori no Uta
%



% Enjoy and have fun.
%********************************************************************************************%
var font1 : int
var font2 : int
var font3 : int
var font4 : int
var buttonnumber : int
var buttonupdown : int
var button : int
var x : int
var y : int

% Menu Music
process DoMusic
    loop
        Music.PlayFile ("Linkin park New Divine.WAV")
    end loop
end DoMusic

fork DoMusic

% Graphic 1 - Title
drawfillbox (0, 0, 639, 399, 255)

locate (10, 23)
colorback (255)
setscreen ("graphics")
color (12)
font1 := Font.New ("AR DESTINE:30")
Font.Draw ("Re:Dance Dance Turing Edition", 30, 200, font1, red)
Font.Free (font1)

delay (1)

locate (10, 23)
colorback (255)
setscreen ("graphics")
color (12)
font4 := Font.New ("AR DESTINE:30")
Font.Draw ("Re:Dance Dance Turing Edition", 30, 200, font4, green)
Font.Free (font4)

%**********************************************************************************************%

% Start
drawbox (20, 20, 100, 100, 12)
locate (22, 5)
put "START" ..
% Instructions
drawbox (540, 10, 620, 100, 12)
locate (22, 70)
put " InFo" ..

buttonwait ("down", x, y, buttonnumber, buttonupdown)
if x > 10 and x < 100 and y < 100 and y > 10 then
Music.PlayFileStop
    cls
   
    %*************************************************************************************************%

end if
   

Sponsor
Sponsor
Sponsor
sponsor
BlackfireSD




PostPosted: Wed Jun 03, 2009 12:29 pm   Post subject: Re: Turing music stop help

I fixed it by having a loop.

loop
Music.PlayFileStop
cls
end loop


if this isnt the right way plz say
Euphoracle




PostPosted: Wed Jun 03, 2009 3:28 pm   Post subject: RE:Turing music stop help

code:
process DoMusic
    loop
        Music.PlayFile ("Linkin park New Divine.WAV")
    end loop
end DoMusic


Don't do this. Use Music.PlayFileLoop. As it stands, once you "stop" the music, the loop in the process kicks in and restarts it. You really have to follow the code with your finger and try to process how turing will run it.
unoho




PostPosted: Wed Jun 03, 2009 8:41 pm   Post subject: RE:Turing music stop help

Music.SoundOf might help
andrew.




PostPosted: Thu Jun 04, 2009 7:06 am   Post subject: RE:Turing music stop help

unoho meant to say Music.SoundOff.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: