Components Flex



    
        
            import mx.core.*;
            import mx.states.*;
            [Bindable]
            public var defInst:DeferredInstanceFromFunction = new DeferredInstanceFromFunction(createMyButton);
            public function createMyButton():Object {
                var newButton:Button = new Button();
                newButton.label = "New Button";
                return newButton;
            }