Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • vyfster

    vyfster

    Member

    1 Points

    14 Posts

    Re: Sound thats loops

    Jan 06, 2009 12:33 PM | LINK

    Hi Jonathan,

     I went to sleep on this post and have only picked it upi gain now. I have managed to get the media element playing, it was a little tricky at first but I understand how it is done now. It is added from the asset library and then dragged and dropped onto the stage. I was looking for an actual media element. The second part of your post has me confused though. Where is it added into the code behind file? I keep on getting build error's so I must be adding it incorrectly.

    /* where in the code behind file does this code get added? */  

    private void PlayMedia(object sender, RoutedEventArgs e)
            {
                media.Stop();
                media.Play();
            }

     

    Thanks for your input so far.