here’s the deal.
i have 2 buttons that each load a different text file into a dynamic text box.
if i press the first button and scroll down on the first text file, when i press the second button to load the second text file, it loads the text scrolled down (to where the first text file was?) this is driving me bonkers . . .
how can i get it so that no matter how far i scroll in the first loaded text, the second loaded text will be loaded scrolled to the top? and then after scrolling text 2 pressing the button to load text 1 and have that scrolled all the way to the top?
also, i’d like to add some code to allow the scrolling up and down to happen on mouse press and not have to keep clicking
i’ve attached my flash mx file (and the text files-gibberish mostly). . . below is the actionscript code as well.
thanks!
peace,
here is the code on the buttons that loads text file 1:
on (release) {
loadText = new loadVars();
loadText.load(“manny.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.mannytext;
};
}
here is the code on the buttons that loads text file 2:
on (release) {
loadText = new loadVars();
loadText.load(“manny2.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.manny2text;
};
}
here is the code on my down scroll arrow:
on (press, release, keyPress “<Down>”) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)<Number(scrollableText.maxscroll)) {
scrollableText.scroll = Number(currentScroll)+1;
}
}
here is the code on my up scroll arrow:
on (press, release, keyPress “<Up>”) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)>1) {
scrollableText.scroll = currentScroll-1;
}
}