This is probably a very simple question, I just do not know how to do it.
I have an object that I want to duplicate and don’t know how to do it. Here is my attempt:
var myObj = new ObjectClass(); var duplicate = myObj; duplicate = null; myObj.function();
ObjectClass is very large, inherets and creates its own children, and I am sure that there may be several singleton classes there.
Is there a way to duplicate something easily?
Edit: It looks like I'm looking for “cloning” for which there is no AS3 function, and you, in turn, cannot clone personal data. Does anyone know a library or workaround for cloning a heap of personal data?
source share