I have a situation where I need to load the same mesh several times,
but with different textures (which I manually apply after the mesh
finishes parsing).  So I want to clone the loader3d.holder portion,
except no cloning method in as3 seems to work.

I tried ObjectUtil.copy() and also did a manual bytearray copy (same
thing as ObjectUtil.copy() i guess) and even though I added a AMF
references to retain class type, there are certain classes that just
do not work.

The difficulty seems to be the circular nature of the referencing..
like when I try to clone animationlibrary, it'll contain channelData
with reference to a target, that has the animationlibrary in it..
Which brings up the question.. how would I even manually copy it by
manually copying every single parameter of every single class if
there's circular reference?

Anyway, ultimately I want to stick the parsed data in some sort of
ready to use form, and then clone from that whenever I need to create
a new instance of the same object, but dynamically texture it.

wouldn't be such a problem if I could just make a duplicate it through
bytearray in the first place..

ideas?  suggestions?

Reply via email to