2 Replies Latest reply on Nov 29, 2006 2:19 PM by Snej45

    How do I control volume for a voice in a video + background music

    Snej45
      I would like to control the volume of a person speaking in a video and the volume of background music independently from each other with two volume bars. The problem seems to be controlling the voice from the video.

      WHat I can do...but not really want to do:
      1) Control volume on voice and music simultaneously (but not independently)
      2) Control music but not voice

      Here is the actionscript that controls the music. The voice actionscript is thought as being almost totally similar.

      I am using Flash 8. Name of video (imported flv) is LD.

      bgSound2 = new Sound(this);
      bgSound2.attachSound("Guitar");
      bgSound2.start(0, 99);
      bgSound2.setVolume(0);
      playB.enabled=false;
      slider2.slideBar2._x = 20;
      slider2.slideBar2.onEnterFrame = function() {
      bgSound2.setVolume(0-(this._x));
      };
      slider2.slideBar2.onPress = function() {
      startDrag(this, false, 280, this._y, 0, this._y);
      };
      slider2.slideBar2.onRelease = slider2.slideBar2.onReleaseOutside=function () {
      stopDrag();
      };
      stopB.onRelease = function() {
      bgSound2.stop();
      playB.enabled=true;
      stopB.enabled=false;
      gotoAndStop("playB");
      };
      playB.onRelease = function() {
      bgSound2.start(0, 99);
      playB.enabled=false;
      stopB.enabled=true;
      };stop();

      Thanks
      Jens