Flash Volume Slider




  Tutorial Instructions



1. Create a movie clip, preferably a circle around 25x25 pixels
You can draw whatever you want but you are currently drawing what you are going to drag.
2. Create a horizontal line around 200 pixels wide.
This is going to be what you are going to drag the dragger across.
3. Convert each into a movie clip. Line:line and Circle:dragger
After you convert each to the necessary movie clip select both and convert them into another movie clip called volume


4. Go into the volume movie clip and add this code to the frame.


   this.ratio = 0;
   dragger.onPress = function() {
       this.startDrag(true, 0, 0, line._width, 0);
       this.onEnterFrame = function() {
          ratio = Math.round((this._x)*100/(line._width));
          _root.mySnd.setVolume(ratio);
       };
   };
   dragger.onRelease = dragger.onreleaseOutside=stopDrag;


5. Test out your movie
Everything should work out! Watch the video above for more in-depth information, or download source files below!