# Help with as3 code

**URL:** <https://forum.kirupa.com/t/help-with-as3-code/284344>\
**Category:** Uncategorized\
**Created:** [March 18, 2009, 9:38am UTC](https://forum.kirupa.com/t/help-with-as3-code/284344 "2009-03-18T09:38:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rororo](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rororo](https://forum.kirupa.com/u/rororo)\
**Post date:** [March 18, 2009, 9:38am UTC](https://forum.kirupa.com/t/help-with-as3-code/284344/1 "2009-03-18T09:38:25Z")

</div>

hey everyone,  
i’m starting to ease my way into as3 - finally! and touching a bit of classes…

now - the issue - i need to create a scrollbar for a movieclip (which will contain anything i want there of course - text or images)… the base of my code was taken from forums but i’ve added some functionality to it - like up and down arrows - and this is where the problem is.

- dragging the scrollbar works fine

- the up arrow works fine

- the down arrow doesn’t fire off the MOUSE\_UP function which removes the enterframe listener that moves the content

- i get no errors when compiling…

This is the the relevant code that sets up the listeners:

```auto
_theScroller.scrollBar.addEventListener(MouseEvent.MOUSE_DOWN, onDraggerPress, false, 0, true);
_theScroller.scrollBar.addEventListener(MouseEvent.MOUSE_UP, onDraggerUp, true, 0, true);
_theScroller.scrollBar.stage.addEventListener(MouseEvent.MOUSE_UP, onDraggerUp, false, 0, true);
                
_theScroller.upArrow.addEventListener(MouseEvent.MOUSE_DOWN, upClick, false, 0, true);
_theScroller.upArrow.addEventListener(MouseEvent.MOUSE_UP, upClickStop, false, 0, true);
                
_theScroller.downArrow.addEventListener(MouseEvent.MOUSE_DOWN, downClick, false, 0, true);
_theScroller.downArrow.addEventListener(MouseEvent.MOUSE_UP, downClickStop, false, 0, true);

```

THANKS!
