i have a script which *should* take any clip named 'scrollable', and scroll
it. the scrollbar is named 'scrollbar' the range of motion for the scrollbar
is defined as 'gutter'. the mask is named 'mask'. for some reason, the
script does nothing. no errors, just does not do anything. all instance
names are named etc.

heres the code - lost in the water without a life preserver :/

// ----- BOF

// mask the scrollable text
scrollable.setMask(_root.mask);

// determine the bounding area for the scrollbar drag
gutterTop = gutter._y - 2;
gutterBottom = gutter._y + gutter._height - scrollbar._height - 2;
gutterLeft = gutter._y;
gutterRight = gutter._y + gutter._width;

// don't use the hand cursor when the mouse is over the scrollbar
scrollbar.useHandCursor = false;

// on entering the frame, see if the scrollbar is 'dragging'
onEnterFrame = function() {
if(dragging = true) {
ypos = ypos + SPEED;
if(ypos > gutterBottom || gutterTop) {
dragging = false;
}
scrollable._y = ypos;
}
else {
// do nothing, not dragging
dragging = true;
}
}

// when the scrollbar is pressed, start dragging
_root.scrollbar.onPress = function() {
_root.scrollbar.StartDrag(false, gutterLeft, guttterTop, gutterRight,
gutterBottom);
dragging = true;
scrollbar.onMouseMove = function() {
updateAfterEvent();
}
}

// when we let go of the scrollbar, throw the bar a little bit, then stop
the movement
scrollbar.onRelease = function() {
this.stopDrag();
}

// ----- EOF ------

--
edward hotchkiss
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to