Dynamic Scroll box Sticky Buttons AS2

  • mrvix
  • Newbie
  • Newbie
  • mrvix
  • Posts: 7
  • Loc: Hong Kong

Post 3+ Months Ago

I have a scroll box that loads text dynamically from a txt file using html and all works amazingly. I use up and down buttons to scroll through what could potentially be a very long amount of text (as the text is updated like news daily). The problem is my buttons will only advance the text in increments one press at a time. I want a means to press and hold the buttons and to allow the text to scroll automatically until the user releases the buttons. here is my code...

for scroll down:

on (press) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)<Number(scrollableText.maxscroll)) {
scrollableText.scroll = Number(currentScroll)+1;
}

}

for scroll up:

on (press) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)>1) {
scrollableText.scroll = currentScroll-1;
}
}

There must be a way i can modify this to be a continuos scroll that only stops on release. Any ideas? Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.