Check for missing file if loaded into loadSound()

I have built an Mp3 player for my site and users are allowed to put their own music into the playlist. The only problem I have run into now is that if the URL becomes invalid later, the player will stop at that song and the user would have to press next to skip to the next song. Is there any way to get the player to do this on it’s own?

AudioPath = aPath[current_song-1];
    song_text.text = songTitle[current_song-1]+" / "+bandTitle[current_song-1];
    MySound = new Sound();
    MySound.setVolume(100);
    MySound.loadSound(AudioPath, true);
    MySound.onLoad = function(success) {
        if (success) {
            // do nothing
        } else {
            if (autostart == "random") {
                current_song = random(song_total)+1;
            } else {
                current_song == song_total ? (current_song=1, current_song=1, current_song=1) : (current_song++);
            }
            playSong();
        }
    };

The code above is not working :frowning: