Computer Science Canada

Music Running IN a proc

Author:  shakin cookie [ Fri Jan 11, 2008 5:49 pm ]
Post subject:  Music Running IN a proc

ok, so i have music playing at the end of my program. It is in a procedure that is called by a button, so i cannot process the music and the proc. How can i get them to run at the same time?

Here is the code:

Turing:

proc display
    title
    Music.PlayFile ("2001_theme.mp3")
    locate (5, 1)
    put "Alex:  Here it is!"
    delay (200)
    put ""
    put "The moment you have been waitin' for!"
    delay (200)
    put ""
    put "Your Pimped...Out...Ferrari...Spider!!!"
    var car1 : int := Pic.FileNew ("ferrari-s+c(r)+b(s)+h(s).bmp")
    Pic.DrawSpecial (car1, 10, -50, picCopy, picFadeIn, 1000000)
end display
[/syntax]

Author:  shakin cookie [ Fri Jan 11, 2008 5:52 pm ]
Post subject:  RE:Music Running IN a proc

and here is the button that calls it:

Turing:

proc doorfs1
    title
var carButton1 : int := GUI.CreateButton (50, 100, 0, "Fin", display)
    loop
        exit when GUI.ProcessEvent
    end loop
end doorfs1
[/syntax]

Author:  Nick [ Fri Jan 11, 2008 6:50 pm ]
Post subject:  RE:Music Running IN a proc

put the music in a process as you normally would then when the proc is called then fork your process throgh the proc

Author:  shakin cookie [ Sun Jan 13, 2008 12:10 pm ]
Post subject:  RE:Music Running IN a proc

oh, ok, that works. now i can sleep at night!


: