# Alpha slider

**URL:** https://forum.kirupa.com/t/alpha-slider/98729
**Category:** Uncategorized
**Created:** [January 10, 2004, 5:41am UTC](https://forum.kirupa.com/t/alpha-slider/98729 "2004-01-10T05:41:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![iceman](https://avatars.discourse-cdn.com/v4/letter/i/46a35a/32.png) [@iceman](https://forum.kirupa.com/u/iceman)
#### Post date: [January 10, 2004, 5:41am UTC](https://forum.kirupa.com/t/alpha-slider/98729/1 "2004-01-10T05:41:00Z")

</div>

Hey everyone,

I was wondering if someone could help put an end to my bitter struggle. I have a slider ball and its movement is contained and I want its position to correspond to the alpha level of another movieclip. I’ve been struggling with this for a while now and can’t figure it out…I’m sure this will be easy for many of you…so I’m hoping to figure something out. Here is the code:[AS] top = borderMC.\_y-borderMC.\_height/2+sliderMC.\_height/2;  
bottom = borderMC.\_y+borderMC.\_height/2-sliderMC.\_height/2;  
side = borderMC.\_x;  
sliderMC.onPress = function() {  
this.startDrag(false, side, top, side, bottom);  
};  
sliderMC.onRelease = function() {  
this.stopDrag();  
};  
sliderMC.onEnterFrame = function() {  
if (sliderMC.\_y == bottom) {  
alphaMC.\_alpha = 0;  
} else if (sliderMC.\_y == top) {  
alphaMC.\_alpha = 100;  
}  
};[/AS]  
Anyways if anyone could help that would be great!

Thanks

Kyle:p:
