# Simple next button

**URL:** <https://forum.kirupa.com/t/simple-next-button/31901>\
**Category:** Uncategorized\
**Created:** [September 29, 2003, 1:46am UTC](https://forum.kirupa.com/t/simple-next-button/31901 "2003-09-29T01:46:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ctrl\_Z](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Ctrl\_Z](https://forum.kirupa.com/u/Ctrl_Z)\
**Post date:** [September 29, 2003, 1:46am UTC](https://forum.kirupa.com/t/simple-next-button/31901/1 "2003-09-29T01:46:24Z")

</div>

on my site I have a dyn text field that displays quotes.  
1st it loads a random quote and then you can hit ‘next’ to view other quotes.  
I have a dyn text field that display what # quote you’re seeing.  
when you hit the next button it displays nothing in the quote field but will show the # 1 in the quote # field. you hit next again and it will show you the #1 quote in the quote field and says it’s #2.  
here is the AS for the loading of the quotes and the next button:

loadText=new loadVars();  
loadText.load(“quotes.txt”);  
loadText.onLoad=function() {  
rn=random(138);  
quotefield.text=this[“quote”+Math.floor(Math.round(rn)+1)];  
}  
var index=rn;  
next.onPress=function(){  
quotefield.text=loadText[“quote”+index++];  
display.text=index;  
}

and here’s the link to the quote movie:  
[http://ctrlzproduction.com/flash/d-75HLK/quotes1.html](http://ctrlzproduction.com/flash/d-75HLK/quotes1.html)

I can’t see what I’m missing that’s making it wrong

thanks in advance
