vlad2005
06-03-2007, 08:52 AM
i have an three component. I want to put some custom icons to each item, using xml. Code until now is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function initApp():void {
myT.dataProvider = myXML;
}
private var myXML:XML =
<rows>
<node label="Paris">
<node label="location1">
<node label="all" />
</node>
<node label="location2">
<node label="all" />
</node>
<node label="location3">
<node label="all" />
</node>
</node>
</rows>
]]>
</mx:Script>
<mx:Tree id="myT" x="274" y="149" labelField="@label" width="287" creationComplete="initApp();"
showRoot="false">
</mx:Tree>
</mx:Application>
How can do this task?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function initApp():void {
myT.dataProvider = myXML;
}
private var myXML:XML =
<rows>
<node label="Paris">
<node label="location1">
<node label="all" />
</node>
<node label="location2">
<node label="all" />
</node>
<node label="location3">
<node label="all" />
</node>
</node>
</rows>
]]>
</mx:Script>
<mx:Tree id="myT" x="274" y="149" labelField="@label" width="287" creationComplete="initApp();"
showRoot="false">
</mx:Tree>
</mx:Application>
How can do this task?