Guess this should do:
public static function cloneObject(object:Object):Object {
        var __return:Object = new Object();
        for(var i:String in object){
            __return[i] = object[i];
        }
        return __return;
}

2006/3/15, Merrill, Jason <[EMAIL PROTECTED]>:
>
> If done it with just:
>
> myObject2 = new Object();
> myObject2 = myObject1
>
> Or are you looking for something else?
>
> Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>
>
>
>
>
>
>
>
>
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED] [mailto:flashcoders-
> >>[EMAIL PROTECTED] On Behalf Of Manuel Saint-Victor
> >>Sent: Wednesday, March 15, 2006 10:21 AM
> >>To: Flashcoders mailing list
> >>Subject: [Flashcoders] Advice on how to make a copy of an object
> >>
> >>I need to make a local copy of an object- basically I have a model
> with some
> >>default values and would like each view to create a local model with
> >>customizations to some parameters.  I've seen some ActionScript 3 ways
> to do
> >>this but am looking for the way it was done in AS2.
> >>
> >>Thanks,
> >>Mani
> >>_______________________________________________
> >>[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
> NOTICE:
> This message is for the designated recipient only and may contain
> privileged or confidential information. If you have received it in error,
> please notify the sender immediately and delete the original. Any other use
> of this e-mail by you is prohibited.
> _______________________________________________
> [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