Dragging Buttons?

I’m messing around with a text box scroller.

I want to be able to click on the scroller bar and drag it up and down accordingly.

My problem is that I am struggling to get it move vertically, what am I doing wrong.

Here is the code I am using:

on (press) {
startDrag ("_root.scroller", false, 578, 35, 578, 163);
}
on (release) {
stopDrag ();
}

code is down farther

The button is already contained within the movieclip…

I’ve tried the code you suggested, but I can’t even get the scroll bar to move…

Hmmmm…make sure the Y value of your mouse is between the two numbers in the second code. I changed the code a little bit too…

put this code on the button:


on(press){
   _root.nFlag = true
}
on(release){
   _root.nFlag = false
}

then on the movie clip put this code


onClipEvent(enterFrame){
   if(_root.nFlag){
      if(_root._ymouse <= 400 && _root._ymouse >= 0){
         this._y = _root._ymouse
      }
   }
}

That works, I had to delete the name from the movie clip.

The only problem is that I need the movie clip named scroller, for the up and down buttons to move the scroller bar…

The name really shouldn’t have anything to do with it. I can’t really help you that much because I don’t have Flash installed on the computer that I am working with at the moment, and I won’t be on that computer for a couple days. Hopefully someone else will be able to help…