Making a FLV player : pb with the mute btn and volume slider

Hi,

i’m currently making a FLV player.
all work fine, except the mute+volume slider.

without pressing mute button, the slider work very well.

when i mute, the sound stop ( great :slight_smile: )
when i re-press on mute, the sound re-start with the slider value for volume.

but my slider don’t work !

another question:
how to rewind my video with the stream cursor ?
( i’m using Flash MX2004, so, onMetaData don’t seem to work ).

here my code:


//-------VOLUME SLIDER ------
volumeSyst.volCursor.onPress = function() {
    this.startDrag(true, 0, 9, volumeSyst.volBar._width, 9);
    this.onEnterFrame = function() {
        _global.monVolume = Math.round(volumeSyst.volCursor._x/(volumeSyst.volBar._width/100));
        so.setVolume(monVolume);
        trace(monVolume);
    };
};
volumeSyst.volCursor.onRelease = volumeSyst.volCursor.onReleaseOutside=stopDrag;
//--
_root.createEmptyMovieClip("vSound", _root.getNextHighestDepth());
vSound.attachAudio(ns);
var so:Sound = new Sound();
so.setVolume(monVolume);
//---------------------------------
mute.onRelease = function() {
    if (testVol == false) {
        trace("volume à 100");
        testVol = true;
        monVolume = Math.round(volumeSyst.volCursor._x/(volumeSyst.volBar._width/100));
        this.gotoAndStop("sound");
    } else {
        testVol = false;
        monVolume = monVolume-monVolume;
        this.gotoAndStop("mute");
    }
};