Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / need help loading music

Author
Message
1manuel
17
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 8th May 2008 18:57
how can i load different sounds in darkbasic like if button 1 is pressed then load sound 1 if button 2 is pressed then load sound 2
KYP
20
Years of Service
User Offline
Joined: 5th May 2005
Location: 01110000
Posted: 9th May 2008 06:23
Well, for numbers, you could do something like this:



That would make a sound play when you pressed 1. With scancodes, 1=0, 2=1, etc.


"Bonjoo!"
A quote from Taylor Quinton Velvety Cummings.
1manuel
17
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 9th May 2008 18:06
I put in the code and it keeps on telling me that the sound could not be loaded
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 9th May 2008 21:22
Is the sound in the same directory as your code? If, for example, your dba code file is in "program files\dark basic software\dark basic" then your sound will also have to be in that same directory.

Fight the good fight of faith,
Lay hold on Eternal Life.
-1 Timothy 6:12-
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th May 2008 05:09
Do the example sound programs that come with DBC work?

TDK_Man

Login to post a reply

Server time is: 2025-06-05 21:13:59
Your offset time is: 2025-06-05 21:13:59