I have a style that I need to duplicate for several buttons. The style is
declared once and then I want to duplicate the object and add a specific
style element and then apply it to the button. However when I duplicate the
object I get a reference to the original object,  as expected. I tried to
fake out a clone method in order to get this to work but it does not seem to
properly duplicate the object. I am sure that this question has been asked a
million times on this list but I can't seem to googlize the correct answer.
Can someone point me in the right direction to properly clone an object and
keep all the right castings. Ahh to just have all the Flex classes in flash.


 

private function cloneObject(object){

                        var iterate;

                        var clone = {};

                        

                        for(iterate in object){

                                    clone [iterate] = object[iterate];

                        }

                        return clone;

            }

 

 

 

Thanks! 

Wade

 

 

_______________________________________________
[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