Make only one array appear on screen

Okay so I have a multidimensional array, and my arrays are joined together to an array arrGrid. I’m a real newbie at this, but I want to randomly show one of my arrays from my list arrGrid. So far I have the randomizer, but it goes through them all and stops at the very last name in my array. I want to be able to stop the array from randomly going through them all, and just show one at a time. Is this possible?

stop();
var arrGrid:Array = new Array; // master array that holds arrays
var arrname:Array = new Array; // all the names

var arrcontainer:Array = new Array; // all the package types
var arrcolor:Array = new Array; // all the colors
var arrfat:Array = new Array; // all the colors

arrname = [“Akita”,“American Bulldog”,“Australian Shepherd”,“Basset Hound”,“Bichon Frise”,“Brittany”,“Cardigan Welsh Corgi”,“Chinese Shar-Pei”,“Doberman Pinscher”,“English Springer Spaniel”,“Great Dane”,“Greyhound”,“Jack Russell Terrier”,“Labrador Retriever”,“Miniature Schnauzer”,“Pointer”,“Poodle”,“Saint Bernard”,“Shetland Sheepdog”,“Scottish Terrier”,“Welsh Terrier”,“Whippet”,“Airedale Terrier”,“American Foxhound”,“Bernese Mountain Dog”,“Border Collie”,“Bullmastiff”,“King Charles Spaniel”,“Chihuahua”,“Chow Chow”,“Dalmatian”,“Cocker Spaniel”,“French Bulldog”,“German Shepherd”,“Golden Retriever”,“Irish Setter”,“Maltese”,“Newfoundland”,“Norwegian Elkhound”,“Papillon”,“Pomeranian”,“Pug”,“Siberian Husky”,“Vizsla”,“West Highland Terrier”,“American Water Spaniel”,“Australian Terrier”,“Beagle”,“Bloodhound”];
arrcontainer = [“guardian”,“hunting”,“herding”,“trailing”,“companion”,“retrieving”,“herding”,“companion”,“guardian”,“retrieving”,“companion”,“racing”,“companion”,“retrieving”,“earthdog”,“companion”,“companion”,“companion”,“herding”,“earthdog”,“earthdog”,“racing”,“hunting”,“trailing”,“herding”,“herding”,“companion”,“companion”,“companion”,“companion”,“companion”,“retrieving”,“companion”,“herding”,“retriever”,“bird”,“companion”,“waterdog”,“hunting”,“companion”,“companion”,“companion”,“racing”,“bird”,“companion”,“bird dog”,“earthdog”,“trailing”,“trailing”];
arrcolor = [“white”,“white”,“red, black”,“tan”,“white”,“brown, white”,“brown, white”,“tan”,“black”,“black, white”,“tan”,“gray”,“white, tan”,“black”,“gray”,“white”,“white”,“brown, white”,“brown, white”,“black”,“black, tan”,“white”,“tan”,“tan”,“black”,“black, white”,“tan”,“black, white”,“tan”,“black”,“black, white”,“tan”,“tan”,“black”,“tan”,“red”,“white”,“black”,“gray”,“black, white”,“black”,“tan”,“black, white”,“tan”,“white”,“brown”,“tan”,“black, tan”,“black, tan”];
arrfat = [“large”,“large”,“medium”,“medium”,“small”,“large”,“small”,“large”,“small”,“medium”,“xlarge”,“medium”,“small”,“large”,“small”,“large”,“medium”,“xlarge”,“small”,“small”,“small”,“small”,“medium”,“large”,“large”,“medium”,“large”,“medium”,“small”,“medium”,“large”,“medium”,“small”,“large”,“large”,“medium”,“small”,“large”,“medium”,“small”,“small”,“small”,“large”,“large”,“small”,“medium”,“small”,“medium”,“large”];

// this puts the arrays into the master array and thu sbecomes a 2d array
arrGrid.push(arrname,arrcontainer,arrcolor,arrfat);

//this function will create a new movieclip from the lib Mc called ‘tbox’.
//and then passes a string the text field called ‘theText’ which is inside each
//…new ‘tbox’. lastly the function attaches it to the parent sprite that is passed to it.
function makeTextBox(s:Sprite,str:String):MovieClip {
var t = new tbox();
t.name = “t1”;
t.theText.text = str;
s.addChild(t);
return t;
}

function changeColor(c:Sprite,str:String):void {

switch(str) {
    case "white":
    c.transform.colorTransform=new ColorTransform(0,0,0,1,100,0,255,50);
    break;
    case "red":
    c.transform.colorTransform=new ColorTransform(0,0,0,1,255,0,0,50);
    break;
    case "black":
    c.transform.colorTransform=new ColorTransform(0,0,0,1,0,0,255,50);
    break;
    case "brown":
    c.transform.colorTransform=new ColorTransform(0,0,0,1,170,180,30,50);
    break;
    

}

}

function selectContainer(c:MovieClip,str:String):void {

switch(str) {
    case "companion":
    //trace(c.name);
    c.gotoAndStop(2);
    break;
    case "hunting":
    c.gotoAndStop(3);
    break;
    case "herding":
    c.gotoAndStop(4);
    break;
    case "trailing":
    c.gotoAndStop(5);
    break;
    case "racing":
    c.gotoAndStop(6);
    break;
    case "retrieving":
    c.gotoAndStop(7);
    break;
    case "guardian":
    c.gotoAndStop(8);
    break;
    case "earthdog":
    c.gotoAndStop(9);
    break;
    case "bird":
    c.gotoAndStop(10);
    break;
    case "waterdog":
    c.gotoAndStop(11);
    break;
}

}

function selectSizing(c:MovieClip,str:String):void {

switch(str) {
    case "small":
    //trace(c.name);
    c.gotoAndStop(2);
    break;
    case "medium":
    c.gotoAndStop(3);
    break;
    case "large":
    c.gotoAndStop(4);
    break;
    case "xlarge":
    c.gotoAndStop(5);
    break;
    
}

}

var container:Sprite = new Sprite;
container.x = 450;
container.y = 250;
this.addChild(container);

//trace(arrGrid);

// this is a nested for loop that walks through each item in the 2 array.
//then it uses the current item to insert the data into a newtextbox object

//finally it moves each new box into a grid pattern

for (var i:int =0;i< arrGrid[0].length;i++)

{

trace(arrGrid[0]* + " -- ");
    var b = makeTextBox(container,arrGrid[0]*);
    
    
    changeColor(b.bg,arrGrid[2]*);
    selectContainer(b.vessel,arrGrid[1]*);
    selectSizing(b.sizer,arrGrid[3]*);

}

var arr2:Array = ;
while (arrGrid.length > 0)
{
arr2.push(arrGrid.splice(Math.round(Math.random() * (arrGrid[0].length-1)), 1)[0]);

trace(“it doesnt stop!”);
}

thanks for anyone that can help. This is due 2morrow and I’ve spent hours trying to figure it out. :frowning: