Hi,
i am studying  the Foto viewer example.  I have a problem loading images in a TileList, seems like no image loads. If  i use cellRenderer and dataProvider of TileList everything's ok. Here is the source code:
 
Application intialize
function initApp() {
 albumSrv.send();
 
}
 
function albumSrvResult(event) {
 album=albumSrv.result.album;
 photoCount=album.photo.length;
 list.selectedIndex=0;
 currentPhoto=album.photo[list.selectedIndex];
 
 var thumb:Thumbnail;
 
 for (var i=0; i<photoCount; i++) {
  thumb=new Thumbnail();
  thumb.setValue(i, album.photo[i]);
  list.addItem(thumb); //the TileList
  
   } 
}
<?xml version="1.0" encoding="utf-8"?>
 
Thumbnail.mxml
<mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml"
    vScrollPolicy="off"
    hScrollPolicy="off"
    borderStyle="none"
    horizontalAlign="center">
    <mx:Script>
        var data: Object;
 
        function setValue(str: String, item: Object) {
            if (data == item) return;
            if (item==undefined) {
                visible = false;
                return;
            } else {
                img.visible = false;
                data="">    img.load=data.thumb;
    img.visible=true;
                visible=true;
    
    mx.core.Application.alert("data thumb :" +data.thumb);
            }
        }
  function setWidth(width: Number) {
  //mx.core.Application.alert("testProperty :" +width);
   img.width=width;
        }
 

    </mx:Script>
 
    <mx:Image id="img" />
 
</mx:VBox>


Yahoo! Groups Links

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005

Reply via email to