Double Drag

Hi all,

At first, I’m really new to action scripting and flash. Honestly I’ve only started using it since yesterday. I managed to create a dragable volume bar which is working. Though I want to add a second piece to it.

this.ratio=0 ;
_root.mySlider.dragger.onPress=function(){
 _root.mySlider.dragger.startDrag(true,0,0,line._width,0);

 _root.mySlider.dragger.onEnterFrame=function(){
  trace ("onEnterFrame called");
  ratio=Math.round(_root.mySlider.dragger._x*100/line._width) ;
  _root.volume = ratio;
  //_root.caption.startDrag(true);
  _root.caption.words = "VOLUME " + _root.volume + "%";
 }
 
}
_root.mySlider.dragger.onRelease=_root.mySlider.dragger.onReleaseOutside=_root.mySlider.dragger.stopDrag;

I’ve commented the piece which should be dragged also, as its brakes the volume bar and the caption part is only dragged at that time.

Also, is the last line of code adjustable so it fits into a function? I’ve tried

_root.mySlider.dragger.onRelease=_root.mySlider.dragger.onReleaseOutside = function() {
_root.mySlider.dragger.stopDrag;
}

though that didnt work.

I’m sorry if I’m abit unclear, I’m not a native english speaker :wink:

Thanks for the great tutorials, they helped me alot creating this :slight_smile: