# AS3 Mixing Multiple Arrays

**URL:** <https://forum.kirupa.com/t/as3-mixing-multiple-arrays/331110>\
**Category:** flash\
**Created:** [May 18, 2013, 3:44pm UTC](https://forum.kirupa.com/t/as3-mixing-multiple-arrays/331110 "2013-05-18T15:44:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antsuperhack](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Antsuperhack](https://forum.kirupa.com/u/Antsuperhack)\
**Post date:** [May 18, 2013, 3:44pm UTC](https://forum.kirupa.com/t/as3-mixing-multiple-arrays/331110/1 "2013-05-18T15:44:18Z")

</div>

Hey all,

The code below shows how I’m mixing an array.

My question is how do I mix multiple arrays but keep the objects inside the arrays in the same order?

e.g. Say I have category2 and it contains “a”, “b”, “c” … if I always wanted “a” to be in the same position in the array as “1”

```auto

var category1:Array = new Array("1", "2", "3");

mixNum = category1.sort(cardShuffle1);
						
function cardShuffle1(category1, mixNum):Number {
	randomNum1 = Math.round(Math.random()*2)-1;
	return randomNum1;
}

```
