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
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
Dont mind me, i figured it out. I put the code on the movie clip itself. Thanks Daheroes and shoutouts to Sephiroth.it for the killa script!! insert gansta pose here