I want to play a simple sound. I'm not getting any exceptions, but the sound just isn't playing
<MediaElement Source="sounds/Laser.mp3" Volume="1" AutoPlay="True" x:Name="Laser" />
Calling the Play() method doesn't work either.
Laser.Play();
I want to play a simple sound. I'm not getting any exceptions, but the sound just isn't playing
<MediaElement Source="sounds/Laser.mp3" Volume="1" AutoPlay="True" x:Name="Laser" />
Calling the Play() method doesn't work either.
Laser.Play();
My best guess is that the Build action needs to be set to "Resource". But here is an excellent article that explains how to add sound (Silverlight 2).