Slider bar to control _alpha etc

Hi!
Im trying to do a slider bar that can controlls a MC _alpha value.
I have done a bar that is 100 pixles and the button is in the middle of the bar. And can go +50 x and -50 x.
Please help me out with this one! What code shall i put on the slider?

/mvh ZeusVL

the easiest way to do it is to start the sliderbar at 0 (within the whole ‘slider’ clip) and have it go to 100 since that is your range (alpha between 0 - 100) The problem here is that you might want to flip the way the slider operates, ie one direction is 0 and the other is 100 as opposed to vise versa. To fix that, just set the _alpha to be based on 100 - the slider position.

Your going based on x (sideways slider) so youd have code like (using startdrag for simplicities sake)

// button in sliderbar
on(press){
startDrag(this,false,0,100,0,0);
}
on(release, releaseOutside){
stopDrag();
}

// sliderbar clip containing slider bar button
onClipEvent(enterFrame){
_root.whateverClip._alpha = 100-_x;
}

Hey!
Thanks man! It helpt alot!
Thank you!