# Pushing text into an array with a button

**URL:** <https://forum.kirupa.com/t/pushing-text-into-an-array-with-a-button/237575>\
**Category:** flash\
**Created:** [August 31, 2007, 4:14pm UTC](https://forum.kirupa.com/t/pushing-text-into-an-array-with-a-button/237575 "2007-08-31T16:14:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alemieux34](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alemieux34](https://forum.kirupa.com/u/alemieux34)\
**Post date:** [August 31, 2007, 4:14pm UTC](https://forum.kirupa.com/t/pushing-text-into-an-array-with-a-button/237575/1 "2007-08-31T16:14:11Z")

</div>

I have an array called lotr that is being displayed into a textfield. I’ve created an input textfield and a button to allow users to add to the array. My script looks like this:

```auto

addto_btn.addEventListener(MouseEvent.CLICK, lotrAdd);
function lotrAdd(event:MouseEvent):void {
    var lotrNew:String = myvalue_txt.text;
    lotr.push(lotrNew);
    trace(lotr);
}

```

The output window shows new values, but the values don’t get updated in the textfield. Is there such a thing as an update or refresh command for the player?

Thanks.
