# Button on custom scrollbar

**URL:** <https://forum.kirupa.com/t/button-on-custom-scrollbar/27294>\
**Category:** Uncategorized\
**Created:** [July 31, 2003, 9:57pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294 "2003-07-31T21:57:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![outro\_lugar](https://avatars.discourse-cdn.com/v4/letter/o/35a633/32.png) [@outro\_lugar](https://forum.kirupa.com/u/outro_lugar)\
**Post date:** [July 31, 2003, 9:57pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/1 "2003-07-31T21:57:35Z")

</div>

I have a custom horizontal scroll bar mc. and I wanna put mc buttons in it so it’s like a navigation bar at the bottom of the page that slides R and L. When you click on one if those mc buttons I want the link to load above the scrollbar. But, when I put the button mcs inside the scrollbar mc, the buttons don’t work anymore. What is wrong here?

---

<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:** [July 31, 2003, 10:44pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/2 "2003-07-31T22:44:20Z")

</div>

Unexpected file format for me.

---

<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:** [July 31, 2003, 11:01pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/3 "2003-07-31T23:01:39Z")

</div>

me as well

---

<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:** [July 31, 2003, 11:06pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/4 "2003-07-31T23:06:24Z")

</div>

me three

---

<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:** [July 31, 2003, 11:52pm UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/5 "2003-07-31T23:52:32Z")

</div>

At a guess it would be that your buttons are no longer working because now that you have put them inside another movie clip you haven’t changed there paths.

ex,

gotoandplay();

\_root.gotoandplay();

\_root.name.name.gotoandplay();

if you haven’t changed this information on your buttons then this might be your problem.

---

<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:** [August 1, 2003, 3:12am UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/6 "2003-08-01T03:12:29Z")

</div>

ok, here is the file one more time,

the button mcs do not have any code that relates to \_root or anything to work. the only thing referring to root is the loadMovie thing but other things do not work either so i dont think that is the case

- they become dead inside of the scrollbar

please help

---

<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:** [August 1, 2003, 4:03am UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/7 "2003-08-01T04:03:16Z")

</div>

Instead of the onPress and onRelease handlers use onMouseDown and onMouseUp handlers…  
[AS]this.onMouseDown = function() {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.startDrag(false, gutterLeft, this.\_y, gutterRight, this.\_y);  
dragging = true;  
this.onMouseMove = function() {  
updateAfterEvent();  
};  
}  
};  
this.onMouseUp = function() {  
if (dragging) {  
this.onMouseMove = undefined;  
this.stopDrag();  
dragging = false;  
xSpeed = (newxpos-oldxpos)\*RATIO;  
}  
};[/AS]

---

<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:** [August 1, 2003, 4:09am UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/8 "2003-08-01T04:09:45Z")

</div>

ok, I did it but it works partially. My button mc’s get highlights through as - on rollOver gotoAndStop(2) and I have a different color at fr2 but not, the trace inside the button mc is working but not hte gotoAndStop codes. ?

---

<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:** [August 1, 2003, 4:25am UTC](https://forum.kirupa.com/t/button-on-custom-scrollbar/27294/9 "2003-08-01T04:25:49Z")

</div>

What are you talking about!?  
… It works fine. 😛
