Hi All,
please, I have a dynamic text field, that loads a external text.
There is a scrollbar component on it.
I have three buttons, when I click at one, it loads a new text at this text field.
Till there, everything is okay.
But, for example, my first text is there. then I scroll till the end of it. And when a load the second text. The scroll bar stays at the point i leave it.
And i would like to it comes to the star position.
please here is my code:
stop();
//
System.useCodepage = true;
import mx.controls.*;
//
loadText = new LoadVars();
loadText.load("faq.txt");
//
loadText.onLoad = function() {
scroller.text = this.faqintro;
};
//
question1_btn.onPress = function() {
loadText = new LoadVars();
loadText.load("faq.txt");
loadText.onLoad = function() {
scroller.text = this.pergunta1;
};
myScrollBar.scrollPosition = 0;
};
question2_btn.onPress = function() {
loadText = new LoadVars();
loadText.load("faq.txt");
loadText.onLoad = function() {
scroller.text = this.pergunta2;
};
myScrollBar.scrollPosition = 0;
};
question3_btn.onPress = function() {
loadText = new LoadVars();
loadText.load("faq.txt");
loadText.onLoad = function() {
scroller.text = this.pergunta3;
};
myScrollBar.scrollPosition = 0;
};
Could someone be so kind, and help on this.
Thank you very much