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?
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)