Need help in text scroll

i’m using this tutorial to make my dynamic scroll text in flash mx… i din choose to use the inbuilt flash mx component because i wanted a custom one…

the thing is… how do i click and hold on my down/up button and the text continue scrollling…

i tried changing the tutorial code

on (press, release, keyPress "<Up>")

to

on (press)

and it doesn’t work…

please advice me what to do… thanks…

I usually do mine similar to this. Put this code on the timeline and give your buttons the instance name of ‘up’ and ‘down’ and name your text box ‘textbox’

up.onPress = up.onDragOver = function() {
pressing = true;
movement = -1;
};
up.onRelease = up.onDragOut = function() {
pressing = false;
};
down.onPress = down.onDragOver = function() {
pressing = true;
movement = 1;
};
down.onRelease = down.onDragOut = function() {
pressing = false;
};
_root.onEnterFrame = function() {
if (pressing == true) {
textbox.scroll = textbox.scroll+movement;
}
};

if you’re using a high frame rate…this would work better:


scrollUp = function () {
	contentText.scroll--;
};
scrollDown = function () {
	contentText.scroll++;
};
//down 
down.onPress = function() {
	scrollDown();
	scrollTextDown = setInterval(scrollDown, 100);

};
down.onRelease = down.onDragOut=function () {
	clearInterval(scrollTextDown);

};
//up
up.onPress = function() {
	scrollUp();
	scrollTextUp = setInterval(scrollUp, 100);
	
};
up.onRelease = up.onDragOut=function () {
	clearInterval(scrollTextUp);
	
};