Displaying server stored images in an air application

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?

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?

Similar Messages

  • Display image in standalone AIR application

    I have loaded images and like to display image in standalone AIR application. But I cannot get it work. The code as follows:
    private function ImageLoader(url:String):void
    var request:URLRequest = new URLRequest(url);
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    loader.load(request);    
    private function loaderComplete(event:Event):void
    var scaleFactor:Number = 1;
    var uic:UIComponent = new UIComponent();
    try
    var bmp:Bitmap = event.target.content as Bitmap;
    var bmd:BitmapData = bmp.bitmapData; //Bitmap(event.target.content).bitmapData;
    var scaledBMD:BitmapData = new BitmapData(400, 400);
    var matrix:Matrix = new Matrix();
    matrix.scale(scaleFactor, scaleFactor);
    scaledBMD.draw(bmd, matrix, null, null, null, true);
    uic.x = 40;
    uic.y = 40;
    uic.addChild(new Bitmap(scaledBMD));
    catch (errObject:Error)
    trace(errObject.message);

    Found answer by adding mx:Canvas and add
    iconCanvas.addChild(uic);
    after
    uic.addChild(new Bitmap(scaledBMD));
    <mx:Canvas id="iconCanvas" width="10" height="10" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="0" y="0" clipContent="false"/>
    Is anyone create "Canvas" by using new Canvas and get it works? example:
    var canv:Canvas = new Canvas(...);

  • Open PS (CS-CS4) and load image from flex/air application?

    Hello,
    (Not sure wether to post this in the AIR forum or the FLEX forum?)
    I am at a loss on how to get my simple application to work. I have a small desktop air application that simply opens Photoshop and runs an action. I used switchboard and the application ran great on PC and MAC. However it only worked for CS3, and CS4 not CS or CS2?. Plus the size of switchboard was a bit large for my small app. I am willing to live with that though . I am using Air with Flex and wanted to know if perhaps there is a beter approach? All the application does is open photoshop, loads an image, and runs an action. Can I do this for all versions of Photoshop using switchboard? Can I do this without switchboard and just use javascript. The big issue is the Air app needs to open Photoshop, and most of the examples have me open PS first and then execute a script located in the PS directory. This needs to work outside of the PS directory. Any examples are appreciated.
    I have looked at the following:
    - SwitchBoard : only works for CS3-CS4 (on my tests)
    - PatchPanel: same issue, plus seperate SDKs
    - ExtendScript: requires script to be run from PS not Air

    Of course you may have some unstated reason for doing this in Air, but if not...
    Google photoshop droplet....
    Bob

  • How do you set up a deployment server to image a Macbook Air

    I have 240 Macbook Airs to deploy.  Having problems gettng them to netboot to the deployment server using the USB network adapter.
    The server is 10.6.8.  Does it need to be updated to Lion to work?

    The new MacBook Airs should boot off a Snow Leopard server machine running Netboot for these machines. At least the 85+ machines I've imaged off my SL NetBoot box do, so that's not the issue. Are using Netboot or something else? What image/build of Lion is on the box that you're trying to boot these machines against? I agree with Captfred if you're trying to use some system restore image for the MacBook Airs, I wouldn't bother. I compiled a custom boot image that installs 10.7.2 already out of the box and all of the Airs fired up just fine.

  • Unable to send file in binary mode to ftp server using AIR application

    Hi,  Can any one help me. i am trying to send local files to ftp server  in binary mode from AIR application using sockets.
    I cant use PASV mode for this FTP server because security restrictions. when i am trying to send Binary command i am always getting
    error code 500 which is unrecognized command. I googled for solutions but i cant find any one using Binary mode to send data every example is using PASV mode to send
    file.
    code example:
    private function upload():void{
    sendCommand("binary ");
    private function sendCommand(arg:String):void {
                                            arg +="\n";
                                            s.writeUTFBytes(arg);
                                            s.flush();
    in response i am getting unrecognized command.

    I'm successfully using an ftp example from http://http://projects.maliboo.pl/FlexFTP/
    that I converted to spark and uses a popup progress window.
    If you don't need to use sockets I can post a sample project.
    I believe I still connect with PASV, but have no problems sending Binary files.
    I don't think they're commands that are dependent on each other

  • Displaying a color image

    i am using the CCWIMAQViewer to display a .tiff image on a dialog application. I can display the image, but it is black and white. does anyone know how to display it in color?

    use the CCWIMAQVision class to create the image, then set the type to RGB, read the image file, and then attach the image object to the image viewer control.
    image=m_CWIMAQVisionObj.CreateCWIMAQImage();
    image.SetType(IMAQ_IMAGE_RGB);
    m_CWIMAQVision1.ReadFile(image, m_strPath + "\\myimage.tif", COleVariant((long)32), vOptional);
    m_CWIMAQViewerObj.Attach(image);

  • Images stored in Application Data folder are not visible in HTML Page generated by AIR Application

    Hi Programmers,
    I have an AIR application where in I am capturing the images of persons via web cam and storing them in the Application Data folder of the users machine. I am successfully able to do so.
    However, when generating the report in the HTML format from within the AIR application, I use the image captured and give the absolute path. but some how the image doesnt appear in the browser, I get the icon for image not found.
    When I right click on the image, select property and copy the image path in new browser, I can see that image. Any thoughts on why this is happening?
    Thanks,
    Hitesh patel

    I tried changing the directory  as following in java class:
    File trgDir = new File("/tmp/myTarget/");
    File srcDir = new File("/tmp/mySource/");
    FileUtils.copyDirectory(srcDir, trgDir);
    but unfortunately  Adf mobile application does not support "File Utils. copy Directory" library
    so is there any way to circumvent this problem.
    Any help would be appreciated 

  • Html display order : PDF document in AIR application

    Hello.
    I read
    "The display order of a PDF file operates differently than other display objects in an AIR application. Although PDF content clips correctly according to HTML display order, it will always sit on top of content in the AIR application's display order."
    I am concerned with the "PDF content clips correctly according to HTML display order" part. I would like to know what it exactly means. That is I want to be sure that I could put, for example, and image over the PDF doc, or any other HTML elements without them being graphically overridden by the PDF view. Thanks in advance.

    My reading of the quoted bits is: Inside the PDF, layer ordering rules should work correctly.  But the PDF itself will float above any other content in AIR.

  • AIR Application Installer screen - name - How to use image??

    I want to use the image instead of the plain text for the name of the application. Is there any way to use image as an application name?
    PrincessWidget-app.xml
    <!-- Used as the filename for the application. Required. -->
    <filename>Princess Countdown Connection</filename>
    <!-- The name that is displayed in the AIR application installer.
    May have multiple values for each language. See samples or xsd schema file. Optional. -->
    <name>assets/Princess_logo.png</name>
    <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
    <version>v1.0.1</version>

    thanks levi_h
    JTextPane class extends JEditPane and allows you to embed
    images or other components within the text managed by the component

  • PC/64/Windows 7/XIStandard recently installed/unable to put footer into document because I can't move to the bottom of the image when in footer application mode.  Display is at recommended 1920x1080.  Is there a solution or is it a flaw in the program?

    PC/64/Windows 7/XIStandard recently installed/unable to put footer into document because I can't move to the bottom of the image when in footer application mode.  Display is at recommended 1920x1080.  Is there a solution or is it a flaw in the program?

    Don't have a direct answer. But did you install the updates. They might resolve the problem.

  • Picking a IDOC Flat File stored in SAP R/3 Application Server by SAP PI

    Hi,
    Can SAP PI pickup a IDOC Flat File stored in SAP R/3 Application Server Directory and send it back as an Inbound IDOC.
    Scenario:
    We have a data in the EXCEL Sheet, which will be used to a fill an IDOC and the IDOC will be just save in the SAP R/3 Application Server Directory, but can not be triggered due to its peculiar behavior. Afterwards, SAP PI should pole the SAP R/3 and pick up that IDOC Flat File from the R/3 Application Server and send it back to the SAP R/3 as an Inbound IDOC.
    For Ref: IDOC does not have a Outbound Process Code, thus can not be triggered and send to SAP PI. It is always used as a Inbound IDOC in SAP R/3 system.
    Regards,
    Saurabh

    SAP PI should pole the SAP R/3 and pick up that IDOC Flat File from the R/3 Application Server
    If SAP PI = 7.11 --> /people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
    send it back to the SAP R/3 as an Inbound IDOC
    why to send  some information again into R3 which it already has? cant some internal code in R3 read the info from excel and then update the IDOC directly?

  • Incorrect functionality of Embedded tag in html page, displaying object on top of all layers of Adobe air application native window

    Title
    Incorrect functionality of embed tag in html loader for adobe air development
    Description
    Problem Description: If we had loaded youtube.com video url in a view stack and navigate to other index of stack or away from we UI screen within the same native window video or embeded tag of flash player or any other embed object will be displayed on top of all screens layer in same position of where the object should be placed in side of html loader only.
    Steps to Reproduce:
    1) go to http://get.straweb.com/StraWebBrowser/StraWebBrowser.air download and install
    2) load 2 tabs and in the 3 tab load video player of youtube.com which will a sample video
    before completing the load of 3 tab which trying to load video from youtube.com, navigate to other tabs 1 or 2 in few second once the flash player of youtube.com video player is load it will display in the current tab or UI screen.
    3) Try navigating to other tabs than youtube.com loaded tab you see the flash player is on top it stable.
    4) navigate to 3 tab and try to navigate to other tab you can observe that so how it will not show that flash player and only visible in that 3 tab which is fine.
    Actual Result: Embedded tag of html page displaying on top of all layers of Adobe air application native window
    Expected Result: Embedded tag of html page should only displayed in side htmlloader
    This you can replicate in any adobe air plugin update and on any Hardware and Environment.
    Applicable to all sdk versions of adobe air.

    Adobe Bugbase: Bug 3823839 Incorrect functionality of embed tag in html loader for adobe air development

  • How to display BLOB image column with WEB application, JSF, ADF BC

    I looking for a way to display the content from a blob column on a WEB application, JSF, ADF BC
    The blob column contains a JPEG image.
    About the application
    The model contains a viewobject where the blob column attribute (photoimg) type is of type : BlobDomain
    Now I have to create the view to display the content of photoimg inside a JSF-JSP page.
    Any advice ?

    Search is your friend
    How to display the content of a BLOB column in a ADF/BC pages ?
    John

  • Display an Image in a Java application !

    Hi all !
    Really i want to display an image in a java application , i know how to do it in applets but this method does not work in applications so please help me to do that in an application ,thanks .

    it is the same way as in applets.
    1. Open a frame with awt
    2. Define an Image (like: Image a=null;)
    3. Load this Image with the Toolkit....(just look which method to use)
    4. draw this image to screen with g.drawImage(...)
    Note the class drawing the image must implement ImageObserver.
    regards

  • Displaying image on the swings application

    Hi All,
    I want to display images onto my swing application. I was using ImageIcon and Class to getResource(filename). It can only provide me images that i have placed in my package not outside my package.
    Please help me, how to to do?
    Thanks in advance.

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons

Maybe you are looking for