Hi I m new to flex, I would like to create two tile list that has a relation to 
each other like if i click one item A in the first tile list and the second 
tile list i would like to show all the categories of A.To do this i need to 
have the dataprovider inserted dynamically, i tried all methods but still 
unable to do so.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
        <mx:states>
                <mx:State name="2ndstate">
                        <mx:AddChild position="lastChild">
                                <mx:TileList    
                        itemRenderer="CustomItemRenderer"
                        
                                labelField="label"
                      iconField="thumbnailImage" x="392" y="116" 
id="tilelist2"></mx:TileList>
                        </mx:AddChild>
                </mx:State>
        </mx:states>
                        <mx:XML id="xml" source="gallery.xml" />
        <mx:XMLListCollection id="xmlListColl" source="{xml.image}" />
        <mx:Button x="131" y="222" label="Button" click="confirm();"/>
        <mx:Label x="103" y="67" text="{xmlListColl}" id="lbl1"/>
        <mx:Label x="103" y="93" text="Label" id="lbl2"/>
        <mx:Label x="103" y="119" text="Label" id="lbl3"/>
                <mx:Script>
                <![CDATA[
                
                private function confirm():void 
                        {


                        currentState = "2ndstate";
tilelist2.dataProvider ="{xmlListColl}" ;                       
                                
                        }       
                
                
                        ]]>
        </mx:Script>
                <mx:TileList x="263" y="91" id="tilelist1" 
click="confirm()"></mx:TileList>
</mx:Application>


Reply via email to