Created
May 27, 2011 00:55
-
-
Save rafaelrinaldi/994441 to your computer and use it in GitHub Desktop.
Tricky way to clone a Vector in ActionScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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