PDA

View Full Version : My smooth scroller wont work damn it


ianlambert
07-12-2006, 10:26 AM
Anybody help Me???? :(

I am trying to produce a smooth action scrolling text panel, I have written the action script for each button as follows...

UP BUTTON-

on (press) {
upint = setInterval(scrup, 100);
}
on (release) {
clearInterval(upint);
}

DOWN BUTTON-
on (press) {
downint = setInterval(scrdown, 100);
}
on (release) {
clearInterval(downint);
}

and FUNCTION script
function scrup() {
txtbox.scroll = txtbox.scroll-1;
}
function scrdown() {
txtbox.scroll = txtbox.scroll+1;
}

But how the heck do I get my buttons to react with the function, I know i'm thick but I am a complete newby can anyone help me please, cheers Ian

davidj
07-12-2006, 10:32 AM
when do you want to fire these functions??

on a button event?

ianlambert
07-12-2006, 11:08 AM
yes david when you press the down button the text should scroll down smoothly and when you press the up hey presto smooth flowing text going up(hopefullY

davidj
07-12-2006, 02:23 PM
on (press) {
upint = setInterval(scrup, 100);

scrup(); // <<

}