Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Scrolling Text Question

Status
Not open for further replies.

swayjenkins

Programmer
Aug 21, 2002
2
US
I have a dynamic text box that scrolls using two arrow buttons at the bottom. The only problem is, I can't get the text to continuously scroll down. I have to repeatedly click either of the arrows for the direction I want it to go. I was having a problem with it before and got a tip off this page that is something like this:

on(press, dragOver){
scrollBox.scroll-=5;
}

If anyone can let me know how to have it scroll without clicking every time I want it to move down it would be greatly appreciated.

sway
 
You need to put the dynamic textfield and its buttons into a movieClip, and add these actions where specified:

UP BUTTON:
Code:
on (press) {
 direction = "up";
}
on (release) {
 direction = "none";
}
DOWN BUTTON:
Code:
on (press) {
 direction = "down";
}
on (release) {
 direction = "none";
}
MOVIECLIP
Code:
onClipEvent (load) {
 direction = "none";
}
onClipEvent (enterFrame) {
 if (direction != "none") {
  if (direction == "up") {
   textVariable.scroll--;
  } else if (direction == "down") {
   textVariable.scroll++;
  }
 }
}
... where "textVariable" is the name of the variable being displayed in your dynamic textfield. _____________________________________________________
Knowledge is attained only by seeking out that which is unknown
 
Perfet, thanks a million. Got it working as soon as I did what you said.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top