Skip to content

Instantly share code, notes, and snippets.

@rafaelrinaldi
Created May 27, 2011 00:55
Show Gist options
  • Save rafaelrinaldi/994441 to your computer and use it in GitHub Desktop.
Save rafaelrinaldi/994441 to your computer and use it in GitHub Desktop.
Tricky way to clone a Vector in ActionScript.
var vec1 : Vector.<String> = new <String>["blue", "gray", "orange"];
var vec2 : Vector.<String> = vec1.concat();
vec1[0] = "foo";
trace(vec1); // foo,gray,orange
trace(vec2); // blue,gray,orange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment