Careful with circular references. Pretty easy to get that one in to
exceed the 256 recursion limit.

Scott

On 23/08/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
static function clone(obj:Object):Object {
        var o = (null != obj.length) ? [] : {};
        for (var i in obj) {
                o [i] = (typeof obj[i] == "object") ? clone(obj[i]) :
obj[i];
        }
        return o;
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to