# Slider bar and alpha values

**URL:** https://forum.kirupa.com/t/slider-bar-and-alpha-values/305454
**Category:** Uncategorized
**Created:** [February 25, 2010, 5:06pm UTC](https://forum.kirupa.com/t/slider-bar-and-alpha-values/305454 "2010-02-25T17:06:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JonnyD55](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@JonnyD55](https://forum.kirupa.com/u/JonnyD55)
#### Post date: [February 25, 2010, 5:06pm UTC](https://forum.kirupa.com/t/slider-bar-and-alpha-values/305454/1 "2010-02-25T17:06:01Z")

</div>

I’m looking to make a slider bar reveal movie clips on my stage as you drag it along.

I’ve written some sloppy code that works, but isn’t smooth by any means. I basically put MCs on different frames on the timeline, and I want those MCs to fade in or out relative to where the pointer is on the bar. This was a workaround, what I think I need is a boolean solution, but I’m not familiar enough with AS to write one from scratch. Here is the code I have so far. Does anyone have any ideas?

```auto
slAlpha.minimum = 1;
slAlpha.maximum = 6;
slAlpha.liveDragging = true;
slAlpha.tickInterval = 1;
slAlpha.addEventListener(Event.CHANGE, sliderChanged);
function sliderChanged(evt:Event):void {
	if(slAlpha.value < 2){
		gotoAndStop ( 1 );
	}
	else if(slAlpha.value == 2){
		gotoAndStop ( 2 );
	}
	else if(slAlpha.value == 3){
		gotoAndStop (3);
}
}

```

Thanks for any help!!!
