# Array push question

**URL:** <https://forum.kirupa.com/t/array-push-question/211539>\
**Category:** flash\
**Created:** [January 2, 2007, 9:12pm UTC](https://forum.kirupa.com/t/array-push-question/211539 "2007-01-02T21:12:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frontin](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@frontin](https://forum.kirupa.com/u/frontin)\
**Post date:** [January 2, 2007, 9:12pm UTC](https://forum.kirupa.com/t/array-push-question/211539/1 "2007-01-02T21:12:33Z")

</div>

Hi!

I have a little question about an array/push. (I’m not a actionscript proff)

When I use the script below ‘myArray’ changes from nothing to ‘cheese’. Logic. But what I want is that everytime I hit my button, ‘cheese’ is added to the array. So when I would have hit my button 3 times, it would look like this: cheese, cheese, cheese. 👁

```auto

myButton.onRelease = function(){
    myArray = [""];
    myArray.push("cheese");
    trace(myArray);
};

```

Possible? How? Thanks! :3ye:

(love those smileys here btw)
