1 Reply Latest reply on Mar 18, 2010 10:41 AM by jimmyoneshot

    Displaying server stored images in an air application

    jimmyoneshot Level 1

      Usually when I go about displaying server stored images in a regular flex application I go about it the following way:-

       

      - Create a mysql database table on a server which contains image names

       

      - Create a php file which generates all of the image namesfrom the table as xml and upload this file to the server

       

      - Create a new flex application/project

       

      - In the application make a http service which points to my php/xml file and turns this data into an array collection

       

      - Set the array collection to the dataprovider of a tilelist component so that all of the images will eventually be displayed within it when they are created

       

      - I set the itemrenderer of the tilelist to an image component which has it's source set to something like source="{'assets/images'+ data.imagename}" with imagename being the field containing the name of the image which is stored in the mysql database table.

       

      - Make a folder in the app/project called assets/images which will contain all of the images

       

      - Upload the app to the server and once it runs all the images will be displayed in the application

       

      - Then any images that are uploaded to the server can also be displayed as long as their names are added to the mysql database

       

      My question is though how do you get server stored images to display within an Air Application? My air app will be used on multiple machines but I want the images in it to be dynamic i.e. stored on a server and can be changed. How can this be done?

        • 1. Re: Displaying server stored images in an air application
          jimmyoneshot Level 1

          I'm struggling to figure out how to access the image files when the assets/images folder will be on a server and the app itself will be on the user's desktop whereas usually in the case of a regular flex app this wouldn't mater as both the app and the image files would be on the server together. Is what I'm trying to do possible i.e. displaying images on a desktop air app straight from a server?