
-----------------------------------
air_force91
Wed Jan 14, 2004 5:19 pm

music on each page
-----------------------------------
im sorry im asking u ppl a lot of ques...i just wanna get as much info on turing as possible...my project is due tomorrow and my partner's not even helping me out! the problem now is that ive added a music file into my title page but i want it to end as soon as the user enters a key to get to a new page...

 var winID : int
        winID := Window.Open ("position:800;350,graphics:800;350")
        
  View.Set ("nocursor")
        


colourback (red)
cls

%music

process DoMusic
    loop
        Music.PlayFile ("piccccc.wav")
    end loop
end DoMusic
fork DoMusic

%Import computer picture
var comppic : int := Pic.FileNew ("computerback.bmp")
Pic.Draw (comppic, maxx div 2 - (Pic.Width (comppic) div 2), maxy div 2 - Pic.Height (comppic) div 2, picMerge)
var fontID : int := Font.New ("Franklin Gothic Medium:16:bold")
Font.Draw ("Welcome To", 300, 300, fontID, green)
Font.Draw ("...", 350, 275, fontID, yellow)

%3D effect for "The Ultimate MB!!"

var size : int := 40
var text : string
var text1 := "The Ultimate MB!!"
var ch : string (1)

var afontID : array 1 .. size of int

for i : size div 2 .. size
    afontID (i) := Font.New ("Tahoma:" + intstr (i))
end for


procedure Text3D (text : string)
    for t : 1 .. length (text)
        for i : size div 2 .. size
            Font.Draw (text (t), t * size, 170, afontID (i), 20 + floor
                (i / size * 15))
        end for
    end for
end Text3D

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You have to insert the picture before the text, so that                   %
%  the text will overlap the picture                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Text3D (text1)

%ball animation

%"enter any key"
var bfontID : int := Font.New ("Arial:10:bold")
Font.Draw ("Press any key to continue...", 597, 25, bfontID, blue)
getch (ch)

cls

%%%%%%%%%%%%%%%%%%%%%%%%%%%%second page%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

colourback (3)
cls


var sizea : int
var text2 : string
sizea := 15
var text3 := "The Ultimate MB!!"

var cfontID : array 1 .. sizea of int

for i : sizea div 2 .. sizea
    cfontID (i) := Font.New ("Tahoma:" + intstr (i))

end for

procedure Text3D1 (text2 : string)


    for t : 1 .. length (text2)

        for i : sizea div 2 .. sizea
            Font.Draw (text2 (t), t * sizea, 315, cfontID (i), 20 + floor
                (i / size * 50))

        end for
    end for


end Text3D1
Text3D1 (text3)

%%Import computer picture

var comppic1 : int := Pic.FileNew ("file4.bmp")
Pic.Draw (comppic1, 90 div 2 , 40 div 2, picMerge)


%%%%%%%%%%%%%%%%%%%%%%buttons

%3rd button

Draw.FillBox (550, 40, 667, 90, 5)
Draw.Box (550, 40, 667, 90, 1)

var dfontID : int := Font.New ("Arial:12:bold")
Font.Draw ("Exit", 590, 60, dfontID, black)

%2nd button

Draw.FillBox (550, 140, 667, 190, 5)
Draw.Box (550, 140, 667, 190, 1)

var efontID : int := Font.New ("Arial:12:bold")
Font.Draw ("Start Game", 562, 160, efontID, black)

%1st button

Draw.FillBox (550, 240, 667, 290, 5)
Draw.Box (550, 240, 667, 290, 1)

var ffontID : int := Font.New ("Arial:12:bold")
Font.Draw ("Instructions", 562, 260, ffontID, black)

%%%mouse detect--*click*

loop

    var x, y, btn : int
    Mouse.Where (x, y, btn)

    if x >= 550 and x = 240 and y = 550 and x = 140 and y = 550 and x = 40 and y 