0 Replies Latest reply on Nov 1, 2007 6:53 AM by southbeachbum

    FLV component / adding vertical volume

    southbeachbum Level 1
      I'm adding a vertical volume to the player with the function videoSound. You can't rotate the volumeBar component and have the handle move along Y, so a new one has to be made. The question is, assigning that function to the flv player component. The fuction works, it's a matter of the flv player component recognizing the function.

      Stage.scaleMode = "noscale";
      myPlayer.contentPath = "testvid.flv";
      myPlayer.playButton = play_pb;
      myPlayer.pauseButton = pause_pb;
      myPlayer.muteButton = mute_b;
      myPlayer.seekBar = scrubtrack;
      myPlayer.volumeBar = videoSound;

      //VERTICAL volume

      this.onEnterFrame = function() {
      videoSound.setVolume(Math.round((volumecontrol.scrubtrack.volumebackgroundmask._x-volumec ontrol.scrubtrack.volumebar._x)/volumecontrol.scrubtrack.volumebar._width*100));
      };

      startVolume = 0;
      volumecontrol.scrubtrack.volumebackgroundmask._x = volumecontrol.scrubtrack.volumebar._x+startVolume;
      videoSound.setVolume(startVolume);

      volumecontrol.scrubtrack.volumebackgroundmask.onPress = function() {
      this.startDrag(true,volumecontrol.scrubtrack.volumebar._x,this._y,volumecontrol.scrubtrac k.volumebar._x+volumecontrol.scrubtrack.volumebar._width,this._y);
      this.onMouseUp = stopDrag;
      };

      volumecontrol.scrubtrack.volumebar.onPress = function() {
      volumecontrol.scrubtrack.volumebackgroundmask._x = volumecontrol.scrubtrack.volumebar._xmouse;
      this.onMouseUp = stopDrag;
      volumecontrol.scrubtrack.volumebackgroundmask.startDrag(true,volumecontrol.scrubtrack.vol umebar._x,this._y,volumecontrol.scrubtrack.volumebar._x+volumecontrol.scrubtrack.volumebar ._width,this._y);
      };