Answer is in the Flash documentation for the TextField scroll property as a
button example:
http://livedocs.macromedia.com/flash/8/main/00002774.html scrollUp_btn.onRelease = function() {
my_txt.scroll--;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
scrollDown_btn.onRelease = function() {
my_txt.scroll++;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "kypsul" <webforumsuser@macromedia.com> wrote in message
news:dpkb98$e7o$1@forums.macromedia.com...
I really need to know how to do this...PLEASE, any help would be greatly
appreciated
I have been working on the code to scroll a dynamic text field. I've gotten
buttons to scroll the text when clicked and I've gotten a scroll bar to
scroll
text when dragged. What I need to do now is get the scroll bar to scroll up
or
down when the up/down buttons are pressed.
Do any of you know how to do this?
Thanks,
Kyle
This is the code that I have so far:
//-----------------------<Scrolling>-----------------------\\
this.scrollDown.onPress = function () {
scrollDirection = "down";
scrollText();
}
this.scrollDown.onRelease = function(){
delete _root.onEnterFrame;
}
this.scrollDown.onReleaseOutside = function(){
delete _root.onEnterFrame;
}
this.scrollUp.onPress = function () {
scrollDirection = "up";
scrollText();
}
this.scrollUp.onRelease = function(){
delete _root.onEnterFrame;
}
this.scrollUp.onReleaseOutside = function(){
delete _root.onEnterFrame;
}
function scrollText(){
_root.onEnterFrame = function(){
if(scrollDirection == "up"){
loadedInfo.scroll -= 1;
} else if (scrollDirection == "down"){
loadedInfo.scroll += 1;
}
}
}
Scroller.onPress = function(){
interval = setInterval(update, 1);
this.startDrag(false, 926, 118, 926, 461);
}
Scroller.onRelease = function(){
clearInterval(interval);
this.stopDrag();
}
Scroller.onReleaseOutside = function(){
clearInterval(interval);
this.stopDrag();
}
function update(): Void {
loadedInfo.scroll =
Math.floor((Scroller._y-110)/((-110+461)/loadedInfo.maxscroll));
}
//-----------------------<Scrolling>-----------------------\\