# Loading Random Quotes - Auto Scrolling?!

**URL:** <https://forum.kirupa.com/t/loading-random-quotes-auto-scrolling/168602>\
**Category:** flash\
**Created:** [November 8, 2005, 5:15pm UTC](https://forum.kirupa.com/t/loading-random-quotes-auto-scrolling/168602 "2005-11-08T17:15:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dasmonstrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dasmonstrum](https://forum.kirupa.com/u/Dasmonstrum)\
**Post date:** [November 8, 2005, 5:15pm UTC](https://forum.kirupa.com/t/loading-random-quotes-auto-scrolling/168602/1 "2005-11-08T17:15:26Z")

</div>

Hi All,

I did a tutorial which I learn how to load random text at a textbox.

the code:

```auto
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!
