Problem with onSoundComplete

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    Problem with onSoundComplete

    I've created a music streaming application for personal use, but I've run into a problem. I tried to add a function to the event onSoundComplete , but nothing happens when the song finishes.

    I did this:
    Code:
    s.onSoundComplete = playSong;
    The function playSong works, because the song starts, and plays, and if I click my "Next" button, it goes to the next song and plays. It just doesn't seem to fire when the song is over.

    Thanks for your help.
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    Well, I solved my own problem. Turns out that in my playSong function I had this code: s = new Sound(); and I never re-registered the handler with the event.

    Dumb beginner mistake I guess.

    Comment

    Working...