# Slider Menu?

**URL:** <https://forum.kirupa.com/t/slider-menu/264601>\
**Category:** flash\
**Created:** [June 27, 2008, 5:47pm UTC](https://forum.kirupa.com/t/slider-menu/264601 "2008-06-27T17:47:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![silvekrown](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@silvekrown](https://forum.kirupa.com/u/silvekrown)\
**Post date:** [June 27, 2008, 5:47pm UTC](https://forum.kirupa.com/t/slider-menu/264601/1 "2008-06-27T17:47:34Z")

</div>

I’m working on a project that involves a dragable slider image. I have the slider working but I want to play a movie clip when it is dragged to a specific location. I have 4 mc that I want to pop up and play when the slider is dragged  
to the corresponding name. Maybe using the X Y coordinates. I’m really new to using flash so any help is really appreciated. Also this project has to be setup following some guidelines. The guidelines I got from the client are below.

Do not call the \_root! Make all your actionscripts relative.  
ActionScript 2.0  
Flash Player 7  
My personal preference is that your movie be in one movie clip placed on the main timeline. This way we can quickly resize the Flash if needed.

I will attach the swf file so it’s easier to see what I’m looking at. Thanks again.  
This is the code that’s on the slider image.

dragger.onPress=function(){  
this.startDrag(true,0,0,line.\_width,0);  
this.onEnterFrame=function(){  
}  
if(dragger.\_y \<= 200 && dragger.\_y \>= 3) {  
gotoAndPlay(“animals”);  
}  
dragger.onRelease=dragger.onreleaseOutside=stopDrag}  
;

I’ll attache the swf and below is a link to the FLA file

> **[Hightail Spaces](https://spaces.hightail.com/resolve/ufid/5984063F149556D9)**
>
> Hightail Spaces lets you send unlimited files, of any size, to anyone. Collaborate with your team and evolve your work.

---

<div class="post-metadata">

**Author:** ![name1](https://avatars.discourse-cdn.com/v4/letter/n/ed655f/32.png) [@name1](https://forum.kirupa.com/u/name1)\
**Post date:** [June 28, 2008, 12:00am UTC](https://forum.kirupa.com/t/slider-menu/264601/2 "2008-06-28T00:00:57Z")

</div>

you will have to create an onMouseMove function that uses a hitTest inside your onPress function, and then delete it onRelease. use the code below inside you dragger.onPress function.

// do note this code will infinitely repeat until stopped, so we will delete the function inside the onRelease  
\_root.onMouseMove = function( )  
{

```
	// is the clip to activate in range?
	if(dragger.hitTest(_root.clipToDetect))
	{
		
                    // actions go here
		clipToDetect.gotoAndPlay(1);	
		
	}
	else if(dragger.hitTest(_root.anotherClipToDetect)
	{
		
		 // actions go here
		anotherClipToDetect.gotoAndPlay(1);	
		
	};
		
	updateAfterEvent( );
		
};

```

// now inside your onRelease function use the code below  
delete \_root.onMouseMove;
