Components Flex



    
        
            import mx.collections.ArrayCollection;
            import mx.controls.List;
            private function creationCompleteHandler(event:Event):void {
                var array:Array = new Array({label: "CA", children: new Array(
                                                      {label: "Los Angeles"},
                                                      {label: "San Francisco"})},
                                            {label: "MA", children: new Array(
                                                      {label: "Boston"})});
                var collection:ArrayCollection = new ArrayCollection(array);
                tree.dataProvider = collection;
            }