Flash duplication of an Object - Cloning library?
问题 This is probably a very simple question, I just don't have the foggiest how to go about it. I have an Object that I want to duplicate, and don't know how to go about it. Here's my attempt: var myObj = new ObjectClass(); var duplicate = myObj; duplicate = null; myObj.function(); // Error: Null reference The ObjectClass is very large, inherets and creates children of it's own, and I'm sure there's probably a few singleton classes in there. Is there a way to duplicate something easily? Edit: