Components Flex



    xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
     
         
        [Bindable] 
        [Embed(source="a.jpg")] 
        public var iconSymbol1:Class; 
        [Bindable] 
        [Embed(source="a.jpg")] 
        public var iconSymbol2:Class; 
        private function setIcons():void { 
            myTree.setItemIcon(myTree.dataProvider.getItemAt(0), 
            iconSymbol1, iconSymbol2); 
            myTree.setItemIcon(myTree.dataProvider.getItemAt(1), 
            iconSymbol2, null); 
        } 
      
    

            width="160" initialize="setIcons();">