Checking if sound is playing

Hi all,

I was hoping that someone knew this off the top of their head, I don’t think it’s too complex. I have an interface where if the viewer is in a specific set of keyframes, there is specific audio that accompanies the visuals. The code below starts the audio in the specific areas that I need it to be started and stops when I go to a different area - just what I need. However, if they click and then remain in the same section, the audio starts all over. I was curious if there is anything I can do with the below code for it to test if the audio of the section is already playing, and if it is, to allow it to continue playing, and if its in a different section, to stop it and allow the other audio of the section to play.

function scrubRelease() {
    stopDrag();
    delete this.onEnterFrame;
    if ((dragger._x>=23) && (dragger._x<=59)) {
        stopAllSounds();
        s40.start(0, 1);
    } else if ((dragger._x>=60) && (dragger._x<=115)) {
        stopAllSounds();
        s50.start(0, 1);
    } else if ((dragger._x>=116) && (dragger._x<=172)) {
        stopAllSounds();
        s60.start(0, 1);
    } else if ((dragger._x>=173) && (dragger._x<=234)) {
        stopAllSounds();
        s70.start(0, 1);
    } else if ((dragger._x>=235) && (dragger._x<=296)) {
        stopAllSounds();
        s80.start(0, 1);
    } else if ((dragger._x>=297) && (dragger._x<=358)) {
        stopAllSounds();
        s99.start(0, 1);
    } else if ((dragger._x>=359) && (dragger._x<=420)) {
        stopAllSounds();
        s00.start(0, 1);
    } else if ((dragger._x>=421) && (dragger._x<=476)) {
        stopAllSounds();
        s10.start(0, 1);
    } else if ((dragger._x>=477) && (dragger._x<=539)) {
        stopAllSounds();
        s20.start(0, 1);
    } else if ((dragger._x>=540) && (dragger._x<=559)) {
        stopAllSounds();
        s30.start(0, 1);
    }
}

Thanks in advace for the help.