1 Reply Latest reply on Jan 27, 2010 12:00 PM by el_kolo

    TileList - How to pick items using rollOver

    el_kolo

      hi,

       

      I have a TileListe with images and their label. Now I want to pick any element from this TileList using mouse rollOver and send this image to another Tile or TileList component, and their label to TextArea. How can I do this? You can see my code below:

       

      TileList.mxml

       

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  xmlns:custom="*">   

      <mx:Script>
              <![CDATA[

      private var arrayData:Array=[{name:"AAA", imgName:"assets/aaa.gif"},
                                          {name:"BBB", imgName:"assets/bbb.gif"},
                                          {name:"CCC", imgName:"assets/ccc.gif"},
                                          {name:"DDD", imgName:"assets/ddd.gif"},
                                          {name:"EEE", imgName:"assets/eee.gif"}];

      public var dp:ArrayCollection = new ArrayCollection(arrayData);

              ]]>
          </mx:Script>

      <mx:TileList ide="tilelist1"

          dataProvider="{dp}" itemRenderer="Thumbnail">

      </mx:Application>

       

       

      Thumbnail.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
          width="300"
          height="320">
              <mx:Label text="{data.name}"/>
              <mx:Image source="{data.imgName}"/>
      </mx:VBox>