Simultaneous actions?

fooyee24
01-06-2002, 02:34 AM
I'm currently working on a simple shooter game.... when i click an animated gif on the form, a bullet sound is played and after that the initial animated gif is made invisible and a new animated gif that features blood spurting replaces the original gif . What i don't like is that when the sound is played, everything halts , it doesn't seem like spontaneous action. What i want is the animated gif to keep moving and changing to the blood animation WHILE the sound is playing! Is that possible? I'm using an API to play the sound.....it's in .wav form. How should i arrange the code to perform simultaneous actions?

PS: please tell me if you need more information that would enable you guys to figure out the code....thanx. :cool:

Flyguy
01-06-2002, 03:58 AM
It think you use the PlaySound, so use the:
SND_ASYNC = &H1
Flag to play the sound asynchronously -- return immediately after beginning to play the sound and have it play in the background.
eg:

retval = PlaySound("C:\Sounds\scream.wav", 0, SND_FILENAME Or SND_ASYNC Or SND_NODEFAULT)

Waxycat
01-06-2002, 09:11 AM
i don't know why you wouldn't be able to do something while a sound is playing. have a timer change the picbox through an array of bmps/gifs/whatever, or just move an array of picboxes.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum