If you use an array for the dataprovider of the tilelist, then it won't pick up any changes to that array.
try using an arrayCollection instead. I'm assuming that your array of images does get populated, and that tileList will normally display such an array? You'd probably want to check both those as well, because I don't actually know the answers offhand. -----Original Message----- From: [email protected] on behalf of Claudio M. E. Bastos Iorio Sent: Sat 23/08/2008 10:01 To: [email protected] Subject: [flexcoders] itemrender - tilelist - Image - AIR Hi, I'm trying to retrieve a directory (AIR) with only images in it, then display a thumbnail for each file using a tilelist. But, I wonder why this code doesn't work: private function OnInit():void{ var file:File = File.applicationStorageDirectory; file.addEventListener(FileListEvent.DIRECTORY_LISTING, handleDIR); file.getDirectoryListingAsync(); } [Bindable] private var arrImage:Array = new Array(); private function handleDIR(event:FileListEvent):void{ for each(var afile:File in event.files){ if(afile.extension == 'jpg'){ var aImg:Image = new Image(); aImg.source = afile.nativePath; arrImage.push(aImg); } } } And the Tilelist control: <mx:TileList id="displayimg" dataProvider="{arrImage}" itemRenderer="mx.controls.Image" width="100%" height="100%"></mx:TileList> Any idea? Thanks in advance. _____________________________________________ Claudio M. E. Bastos Iorio <http://www.blumer.com.ar/> http://www.blumer.com.ar ______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________
<<winmail.dat>>

