0
Answer

Attaching Sound File In Game

Piyush chhabra

Piyush chhabra

10y
582
1
Hello Everyone..
 
i have made a brick breaker game in which bricks are destroyed using a ball.
i have also gave a sound on brick breaking.
here is my code
 
private void sound1()
{
SoundPlayer player=new SoundPlayer(); 
player.SoundLocation = @"C:\Users\Piyush\Documents\Visual Studio 2008\Projects\BrixGame\BrixGame\Resources\beep3.wav";
player.Play();
}
 
I have called this Sound1 Function When I need to play sound. 
Everything is working correctly. But When i make setup of my Game.Sound Comes Only Till when the file beep3.wav is at the location.
so when i transfer game's setup into other computer. it does not give the sound because the file is not at that location  in other computers.
so how can i remove this error..
PLEASE HELP... Thanx In advance....!!