Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About eddirae

  • Rank
  1. Foxy Mod, I got it to work!! Thanks for all of your help. This is the code that I used. Private Sub PlaySound() Dim scriptKey As String = "UniqueKeyForThisScript" Dim javaScript As String = "<script type='text/javascript'>var sound = new Audio('mp3/Ship_Brass_Bell.wav');sound.play();</script>" ClientScript.RegisterStartupScript(Me.GetType(), scriptKey, javaScript) End Sub
  2. I would love to, but I am crunched for time on this. I really need a solution on this, if you have one. Thanks!! Eddi Rae
  3. Thanks for the input Foxy Mod. This is very helpful. One question....How do I place the sound.play into the timer when the timer goes to zero? Below is the code for what I am doing. Protected Sub Timer1_Tick(sender As Object, e As System.EventArgs) Dim timer, timer_arr() As String timer = lblTimer.Text timer_arr = timer.Split(":") Dim seconds As Integer = Double.Parse(timer_arr(2)) Dim minutes As Integer = Integer.Parse(timer_arr(1)) Dim hours As Integer = Integer.Parse(timer_arr(0)) If seconds = 0 And minutes = 0 And hours = 0 Then PlaySound() Timer1.Enabled = False getNextLevel() Exit Sub Else seconds = seconds - 1 End If If (seconds < 0) Then seconds = 59 minutes = minutes - 1 End If If minutes < 0 Then minutes = 59 hours = hours - 1 End If lblTimer.Text = Format(hours, "00") & ":" & Format(minutes, "00") & ":" & Format(seconds, "00") End Sub
  4. Hello, I am trying to play a sound on the client side when the timer goes down to 0. It works on my local, but it isn't working when I place it on the server that I am running the website. Here is my code. Private Sub PlaySound() Dim strpath As String = Server.MapPath("mp3/Ship_Brass_Bell.wav") Dim sp_sm As SoundPlayer sp_sm = New SoundPlayer sp_sm.SoundLocation = strpath sp_sm.Play() End Sub I don't have any reference on the web page itself. Please let me know where I am going wrong with this. Thanks for your help in advance, Eddi Rae
  • Create New...