Hi!
I am trying to make a textscroll with two arrows that will control the scrolling. However it doesn’t work out that well. After a while of pressing on the arrows the scroll tilts. It just won’t work well anymore. How can this be solved, what am I doing wrong?
You can watch the textscroll via this page:
http://www.redpoint.se/textscroll
And you can download the FLA file via this link:
http://www.redpoint.se/textscroll/fla/scroll_txt2.fla
Or by the attachment!
This is how the actionscript looks like:
Up arrow:
on(press)
{
upint=setInterval(scrup,100);
}
on(release)
{
clearInterval(upint);
}
Down arrow:
on(press)
{
downint=setInterval(scrdown,100);
}
on(release)
{
clearInterval(downint);
}
Code in a frame above the scene:
function scrup()
{
txtbox.scroll=txtbox.scroll-1;
}
function scrdown()
{
txtbox.scroll=txtbox.scroll+1;
}
Please help me out on this one!
Best regards
JoakimN