Hi all,
              I want to create for image list.The list will be initially
empty. On an event ->button click, I am  creating  new  Image having source
path given in texinput. After that i am  pushing that Image to array. I am
using Tilelist for that. This is my first encounter with tileList and
images, so i may be missing many obvious things. Is ItemRenderer must for
every tilelist ?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
    <mx:TileList x="195" y="10" width="113"  dataProvider="{TileListdp}"
height="292" id="myList"  rowCount="1"></mx:TileList>
    <mx:Button x="52" y="170" label="Button" click="dodo();"/>
    <mx:TextInput x="32" y="122" width="85" id="test_txt"/>

    <mx:Script>
        <![CDATA[
            import mx.controls.Image;

            import mx.collections.ArrayCollection;

            [Bindable]
            public var TileListdp:ArrayCollection;

              private var myArray:Array = new Array;

            public function dodo():void
            {
                var image1:Image = new Image;
                image1.source = test_txt.text;
                myArray.push(image1);

               }


              private function initData():void
              {
                 TileListdp = new ArrayCollection(myArray);
              }



        ]]>
    </mx:Script>
</mx:Application>


-- 


Regards,
Yogesh

Reply via email to