# Draggable Buttons

**URL:** <https://forum.kirupa.com/t/draggable-buttons/9224>\
**Category:** flash\
**Created:** [December 7, 2002, 1:26pm UTC](https://forum.kirupa.com/t/draggable-buttons/9224 "2002-12-07T13:26:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Furious5](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@Furious5](https://forum.kirupa.com/u/Furious5)\
**Post date:** [December 7, 2002, 1:26pm UTC](https://forum.kirupa.com/t/draggable-buttons/9224/1 "2002-12-07T13:26:37Z")

</div>

Ok I posted a message last week about this, but haven’t really got much further with it.

Basically I have button contained in a movie clip (scroller), I want to be able to drag the button up and down and get this to move some dynamic text.

If you want to have a look at the fla: [http://www.furious5.co.uk/test/news.fla](http://www.furious5.co.uk/test/news.fla)

Jubba suggested the following code for the button:

```auto

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

```

And this code for the mc:

```auto

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

```

My problem is that this only moves the button up and down, and doesn’t move the dynamic text. Plus when the mc is named scroller it seems to conflict with code and moving the button doesn’t work.

Can anyone suggest some modifications to the code.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 8, 2002, 1:25pm UTC](https://forum.kirupa.com/t/draggable-buttons/9224/2 "2002-12-08T13:25:18Z")

</div>

If you want to make a text scroller:[http://actionscript.org/tutorials/intermediate/scrolling\_a\_text\_box\_II/index.shtml](http://actionscript.org/tutorials/intermediate/scrolling_a_text_box_II/index.shtml)

pom :cowboy:
