I am new to as3 and need your help.
I would like to combine two arrays such that the elements of each array follow each other in alternating order.
For example, if Array1=(1,2,3) and Array2=(A,B,C), I would like my combined Array to look like (1,A,2,B,3,C).
When I use the concatenate function the arrays are combined like this: (1,2,3,A,B,C) and this is not what I want.
Please let me know if you know the answer.
Thank you so much.
I don't think there is a single function that does what you want, but there are various ways you could solve the problem. Are you assuming that the arrays are always the same length? If you are, here's one way:
var array1:Array = "1,2,3";
var array1:Array = "A,B,C";
var combined:Array = ;
After that, the array 'combined' would be how you wanted the array to be.
Thank you soo much! It worked! I am very grateful for your quick and helpful response.
I have been trying to do this since the last 3 hours!