While troubleshooting a Flash app, it took me hours to figure
out that you need to make a duplicate of an Array variable if you
are passing it between objects. Otherwise, any alterations that you
make to the array will result in the original array being altered
as well as the "new" array.
I'm no developer, can someone please explain why you have to
do this? Or, give me an instance when you wouldn't want to make a
duplicate? Just trying to understand.
it is because if you do something like this
all you are doing is storing a reference to a in a variable
b.Instead, either copy oput the array again or use one of the array
methods which return an array eg