# Make array items appear on button click

**URL:** <https://forum.kirupa.com/t/make-array-items-appear-on-button-click/69827>\
**Category:** flash\
**Created:** [November 8, 2004, 3:08pm UTC](https://forum.kirupa.com/t/make-array-items-appear-on-button-click/69827 "2004-11-08T15:08:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stockdill](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@stockdill](https://forum.kirupa.com/u/stockdill)\
**Post date:** [November 8, 2004, 3:08pm UTC](https://forum.kirupa.com/t/make-array-items-appear-on-button-click/69827/1 "2004-11-08T15:08:20Z")

</div>

Hi I have items stored in an array in a txt file.  
word1= Italy&word2= Napoleon&word3= Garibaldi

AT the moment when the screen loads all the text appears in different dynamic text boxes.

I would like to change it so that I can have a button and when you press it it will make the words appear one at a time in just one text box.( to play jeopardy)

E.g. on 1st press it would make word1 appear, then if you continue pressing it the word2 and then word3 will appear in turn.

At the moment I load it like this  
loadText = new LoadVars();  
loadText.load(“Jeopardy words.txt”);  
loadText.onLoad = function() {  
topic1.text = this.word1;  
topic2.text = this.word2;  
topic3.text = this.word3;

};

I’ve looked through tutorials on this and other sites but I can’t find one which does exactly what I am wanting.  
Cheers  
Lesley
