# Array headache

**URL:** <https://forum.kirupa.com/t/array-headache/115794>\
**Category:** Uncategorized\
**Created:** [July 12, 2004, 12:35am UTC](https://forum.kirupa.com/t/array-headache/115794 "2004-07-12T00:35:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worm](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/worm/32/235_2.png) [@worm](https://forum.kirupa.com/u/worm)\
**Post date:** [July 12, 2004, 12:35am UTC](https://forum.kirupa.com/t/array-headache/115794/1 "2004-07-12T00:35:38Z")

</div>

Im pretty much new to arrays and its killing me to figure some stuff out. I have the following script on the main timeline in my movie

```auto
Array.prototype.shuffle=function(){
   for(i=0;i<this.length;i++){
      var tmp=this*;
      var randomNum=random(this.length);
      this*=this[randomNum];
      this[randomNum]=tmp;
   }
}

// USAGE:

arr1=["a","b","c","d","e"];
arr1.shuffle();
trace(arr1);

```

much thanks to sephiroth for it. Anyways, i created a movie clip with a dynamic textbox in it which i was hoping could pull one of the values from the array. How do i do this?

I uploaded the fla so hopefully one of you guys could tell me where im going wrong
