Different working emulator - real phone
-
Saturday, February 18, 2012 12:02 PM
Hello, this is my first thread, I´m learning how to create applications for windows phone and I´m having some troubles.
Currently, I´m creating a simple audio-quotes app, You press different buttons and different sounds are played.
Te code I´m using in .xaml is:
<Button Content="content" Height="119" HorizontalAlignment="Left" Margin="12,50,0,0" Name="button1" VerticalAlignment="Top" Width="233" Grid.Row="1" Click="button1_Click" />
<MediaElement Grid.Row="2" Height="120" HorizontalAlignment="Left" Margin="308,96,0,0" Name="media1" VerticalAlignment="Top" Width="160" Source="Sounds/media1.mp3" AutoPlay="False" Grid.RowSpan="2" />
associated with this xaml.cs:
private void button1_Click(object sender, RoutedEventArgs e)
{
media1.Play();
}And I have the same code for more quotes (obviously changing names and positions).
When I run it on the Emulator, it works fine, but when I run it on my phone, just 3 of the sound files are played, the other buttons just don´t do anything.
The sounds are in the same file format (.mp3), and they are as incrustated resources and always copy.
I don´t understand where´s the mistake, someone have an idea? Sorry about my English, I´m learning it too.
All Replies
-
Monday, February 20, 2012 12:40 PM
did you get any error message while click on keys ?
did you check related sound file is exist on click event ?

