sal1150
asked on
NICE OUTPUT IF I DELAY MY CODE.
I have quiz application.
when the user select answer the program will do the folowing:-
1-background wave will stop.
2-wrong or true wave will play.
3-tow picture will show.
4-timer will stop.
5-move the recorde next.
6-background wave will play.
these steps must happen sequent
how can i control them to delay untill a control action finish.
when the user select answer the program will do the folowing:-
1-background wave will stop.
2-wrong or true wave will play.
3-tow picture will show.
4-timer will stop.
5-move the recorde next.
6-background wave will play.
these steps must happen sequent
how can i control them to delay untill a control action finish.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Zip it up and send it to me (holmesshane AT charter DOT net) and i'll take a look at it for you.
Shane
Shane
sal1150, you will also need to put
mmsystem
in your uses clause
example:
uses windows, forms, ....mmsystem;
also, if you want your back ground music to loop (kee playing), do the following
playsound('c:\mywav.wav',0 ,SND_ASYNC or SND_LOOP);
Shane
mmsystem
in your uses clause
example:
uses windows, forms, ....mmsystem;
also, if you want your back ground music to loop (kee playing), do the following
playsound('c:\mywav.wav',0
Shane
ASKER
ooooooooooooh Shane
u do not understand me! I how to play the waves.
I want to control the amount of time
if the user select answer then ;
true wave will play.
true picture occurs and wait for (X) milliseconds.
after true picture hide then next record load and program must wait untill record load.
after next record load then background wave will play.
that all.
u do not understand me! I how to play the waves.
I want to control the amount of time
if the user select answer then ;
true wave will play.
true picture occurs and wait for (X) milliseconds.
after true picture hide then next record load and program must wait untill record load.
after next record load then background wave will play.
that all.
can you zip it up and send it to me and i'll take a look at it, maybe i can understand you better with the code in fron of me.
holmesshane AT charter DOT net
holmesshane AT charter DOT net
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks necro_ccs, im glad someone understood and could help out!
Shane
Shane
FYI, that should be "procedure Delay (DelayTime : Cardinal)" not function ;)
ASKER
shane I think no need to zip it now because necro_ccs code is good.
Thanks necro_ccs
nice code but how can I use it to wait until row is loading from the table?
ASKER
How can I use NECRO_CCS code to wait until row is loading from the table?
How are you loading a row from a table?
Can you do this as a blocking method?
What sort of table are you loading the question from? Is there an event that is triggered when this occurs? My code above is just sort of a very simplified wait function. You could implement the same using a TTimer object as well... please advise.
Can you do this as a blocking method?
What sort of table are you loading the question from? Is there an event that is triggered when this occurs? My code above is just sort of a very simplified wait function. You could implement the same using a TTimer object as well... please advise.
ASKER
my table has more than 2000 records.
and it sort as a random.
and it sort as a random.
if you really need multi-channel audio support for different sounds & background music I believe that Direct Sound is probably the best way to go
This can be done manually using the jedi delphi header transalations
http://www.delphi-jedi.org/
these are the main delphi translations of the directX headers used by C
& C++ programmers.
There is lots of sample code in the jedi sample library.
If you want to play a wave file as background music, then have different speaker sounds for your answer options, this can be done...
Let me know.
Shane