Array in function

i’m trying to assemble a reference to an array within a function and then pass the appropriate array on to another function. should be simple, but can’t seem to iron it out.

something like this:

_global.monkeyArray=new Array("monkeyOne", "monkeyTwo", "monkeyThree");

_global.fishArray=new Array("fishOne", "fishTwo", "fishThree");

myFunction=function(myString){
nArray=_root[myString+"Array"];
myotherfunction(nArray);

}

myotherfunction being a function looking for an array to be passed in.
Then i can pass in “monkey”, “fish”, whatever and it’ll reference the associated array.

i know i’m not constructing the reference to the array properly but i’ve tried it several different ways now… brain is refusing to cooperate.