Hi All,
I did a tutorial which I learn how to load random text at a textbox.
the code:
System.useCodepage = true;
//-- Random Quotes Script
ranQuote = new LoadVars();
ranQuote.onLoad = function(sucess) {
if (sucess) {
RanNum = Math.ceil(Math.random()*5);
ran = this["quote"+RanNum];
quote_txt.text = ran;
} else {
quote_txt.text = "Error Text.";
}
};
ranQuote.load("quotes.txt");
stop();
//-- Button Next
this.next_btn.onPress = function() {
gotoAndPlay(1);
};
Please anyone have a tip how can I make the text auto scroll if it is bigger than the textbox?
Thank you very much!