简体   繁体   中英

How to get online images list in flex mobile application

Does flex allow to fetch contents from server?

Ex: The server is http://www.sample.com/images/ , and the contents like img1.jpg , img2.jpg , img3.jpg , etc...

How to get those images in my application?

You need to place a file on the server that describes the data in that directory. Most easily an XML file with a list of the directory contents. Then you load up that known file, parse out the results, then load each of the images within it. Alternatively, and not recommended, if the data does follow the pattern such that it is sequentially numbered like that, you could try to load images, starting at 1, looping until you get a 404. Not as elegant, but would work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM