Need a bit of desparate help. I’ve just finished a full site build…content areas are scrolling dynamic text boxes loading external txt files and formatted with CSS. Everything basically works fine but I just noticed something buggy regarding the scroll button functions that I need to correct. Here is the code:
//content scroll button functionality
buttonDown.onRollOver = function() {
_root.onMouseDown = function() {
onEnterFrame = function() {
loadedText.scroll += 1;
};
};
_root.onMouseUp = function() {
delete onEnterFrame;
};
};
buttonUp.onRollOver = function() {
_root.onMouseDown = function() {
onEnterFrame = function() {
loadedText.scroll -= 1;
};
};
_root.onMouseUp = function() {
delete onEnterFrame;
};
};
It scrolls on press and release like it should but unfortunately it’s somehow not just relating to the up/down scroll buttons, but the entire textbox. For example, If I click a scroll button and release…that works…now say Ive scrolled to a particular piece of the content with a link…if I go to press the link, the text box will continue srolling in the direction of the last button pressed.
I’m guessing it has to be how the mousedown function is working but not sure how to rectify it. Anyone have any ideas how I can fix this? I’ve attached a small flash file that shows the problem.