0 Replies Latest reply on May 22, 2008 5:03 AM by treesg

    Dynamic TileList + Images

    treesg
      Hi all
      I made a tile list inside tab navigator both dynamically..
      now I want Images whose URL is in XML to displayed according to tab change.
      problem is taht I m not able to display images on tilelist ..just url of images is coming correctly...
      some piece of code is given below.
      Please help me out..
      thanks


      private function addTab(tabName:String, thumbArr:Array):void {
      var newVBox:VBox = new VBox();
      var newLabel:Label = new Label();
      var newTileList:TileList = new TileList();
      var imageList:Image=new Image();
      newVBox.label = tabName;
      //newTileList.name = tabName;
      //newLabel.text = "TabNavigator container panel " + numChild;
      newVBox.addChild(newLabel);
      //newTileList.addChild(newLabel);
      tn.addChild(newVBox);
      newVBox.addChild(newTileList);
      newTileList.height=500
      newTileList.width=250
      newTileList.addChild(imageList);

      //newTileList.itemRenderer="{CustomItemRenderer}";
      //tn.addChild(newTileList);
      for (var a:Number=0; a<thumbArr.length; a++) {
      //for (var b:Number=0; b<newArr.length; b++) {
      if (thumbArr[a].substr(0,thumbArr[a].indexOf(",",0)) == tabName) {

      newTileList.dataProvider=thumbArr[a].substr((thumbArr[a].indexOf(",",0))+1,thumbArr[a].le ngth)

      }

      //}
      }


      }