Randomizing Arrays with linked multiple values

I am currently using this AS to randomize an array:


function shuffle(wordtestmix,b):Number {
var num : Number = Math.round(Math.random()*2)-1;
return num;
}
var wordtest:Array = wordtestmix.sort(shuffle);
trace(wordtest);


However, at the moment my array is a list of single values. I would like to add another set of values that are linked to the first

i.e
[value 1, value1b],[value2,value2b],[value3,value3b]

and would still like to randomize the array without splitting the two values up.

What is the best way to declare this type of array and also adjust the randomize code in order to mix it correctly.

Much appreciated :slight_smile: