Anyone can told me what is the problem why will no display the image on emulator ? the url is the text file create by array.Any problem with my looping?
var win =Ti.UI.createWindow(); var url = 'https://dl.dropboxusercontent.com/u/238879049/Scrollable/DataStructure.txt'; var client = Ti.Network.createHTTPClient({ onload:function(e){ var jsonString=JSON.parse(this.responseText); for(var i=0;i<jsonString.length;i++){ var img = Ti.createImageView({ image:jsonString[i].img }); Ti.API.info('test'); var imgWrapper = Ti.UI.createScrollView({ maxZoomScale:2.0 }); imgWrapper.add(img); var photosView = Ti.UI.createScrollableView({ showPagingControl:true, views:[imgWrapper] }); win.add(photosView); }//end loop }, onerror:function(e){ alert('Connection Lost'); }, timeout:20000 }); client.open('GET',url); client.send; win.open();