MX: Custom Scrollbar... _ymouse trouble?

G’day.

I made a custom scrollbar for a textfield that works like a charm… but in it’s “alpha-state”, it was only showing where the text was scrolled to (and how long the text is, by it’s own height)- you couldn’t actually click the scrollbar and drag it.

So I added a little AS to the actual scrolling block MC that should work… and kind of does- but not like I think it logically should…?

Here’s the code:[AS]on(press) {
_root.start_y = _ymouse;
}
on(release, releaseOutside) {
_root.start_y = undefined;
}

onClipEvent(mouseMove) {
if (_root.start_y != undefined) {
// = do the following only if left mouse button is held:
if (_ymouse > _root.start_y) {
trace(“Down”)
_root.scrollDown();
} else {
if (_ymouse < _root.start_y) {
trace(“Up”)
_root.scrollUp();
}
}
}
}[/AS](“scrollUp” and “scrollDown” are functions on the main timeline’s “Actions” Layer for setting the textfield’s “scroll”-value… the textfield itself has an “onScroller” attached to it that positions the scrollbar)

Like I said- all this works well BUT when I’m dragging down and then back up, the traced output “sputters” something like:
[…]
Down
Down <- changed from dragging down to to dragging up, here
Up
Down
Up
Down
Up
Up
Up
[…]

When I also traced the “_ymouse”-value, it actually DID skip between values in an unusual way (higher and lower than the “_root.start_y” value) that justifies the sputtering- so I’m guessing that there’s a problem with the “_ymouse”-retrieving…?

Has anyone had similar trouble? If so and you think you know what it could be, please pose a reply- if not, I’ll derive a reduced version of the FLA-file with just the code in question and post it here.

Thanks in advance!