AIR+AJAX+FTP

Hi,
I am building an app which needs to connect via ftp and
upload some files to the server. I am using AIR and AJAX. I am not
able to do that. All the tutorials are mainly for Flex. Can anyone
help me?
Gaurav

I am just touching my toes into AIR+AJAX now, and would be interested in created a similar app, where a user could drag a file from their desktop to the app, and upload to ftp.  Did you get any help on this, or know of any tutorials that may be helpful?
Cheers,
Dan

Similar Messages

  • Not supported: Air + Ajax + (flex-ajax-bridge) + LCDS

    I'm building an application Air (Flex + extjs) and offline synchronization with LCDS. For sure I need the flex-ajax-bridge.
    But the experiments failed on Air runtime container, when ajax tried to communicate with server end data services.
    And I checked the source code of flex bridge file (FDMSBridge.as):
    import bridge.FABridge;
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.external.ExternalInterface;
    import mx.core.mx_internal;
    use namespace object_proxy;
    [Frame(extraClass="FakeFlexInit")]
    public class FDMSBridge extends FDMSBase
    private var gateway:FABridge;
    public function FDMSBridge()
    super();
    if (ExternalInterface.available == false)
    return;
    ExternalInterface.addCallback("createObject", createObject);
    private function createObject(className:String, cArgs:Array):Object
    From the source code, we can tell the bridge rely heavily on the flash.external interface; AND look at this link -
    http://livedocs.adobe.com/labs/air/1/aslr/flash/external/ExternalInterface.html
    where it says -
    Note: Adobe AIR currently does not support the ExternalInterface class.
    which leads to the conclusion that:
    Air + Ajax(HTML) + LCDS solution is not supported by AIR currently.
    The ExternalInterface class environment:
    Browser Operating System Operating System
    Internet Explorer 5.0 and later Windows
    Netscape 8.0 and later Windows MacOS
    Mozilla 1.7.5 and later Windows MacOS
    Firefox 1.0 and later Windows MacOS
    Safari 1.3 and later MacOS
    Can anyone tell me what's the version of AIR built-in browser (squirralfish)? or, will AIR support FDMSBridge soon?
    Thanks!

    I agree, it would be nice to have gzip encoding support in
    AIR's browser component. But, I looked at what my AIR app sends
    when it requests a web page, and it's not claiming to the remote
    server that it can support gzip. If the server is sending the
    content gzipped anyway, it's almost certainly broken. Web servers
    aren't supposed to dictate encodings. Clients say what they're
    capable of receiving, and servers send the data in that format if
    they're capable of sending any of the requested formats.
    I see only one exception in the spec.
    Section
    14.3 says the server is allowed to send what it likes if the
    client doesn't say what it wants (true for AIR) and it cannot
    support the default, which is to say, sending the raw data as it is
    on disk. So, is that the case? Can this server really not send raw
    data, to anyone, ever? If so, it's violating the spirit of the web,
    to the point that I'd say it's broken, even if the spec does allow
    it. And if the server really is capable of sending the raw data,
    it's
    really broken for insisting on sending it compressed when
    the client hasn't told it that it can handle it; this would
    actually be against the spec, not just against the spirit of the
    spec.
    It would seem a more sensible use of your time to fix the
    server than to go and learn another technology just to work around
    its brokenness.

  • JQuery AJAX vs. Adobe AIR AJAX Class

    Hi,
    I would like to use jQuery for my next project, and as you know, jquery comes with an included AJAX module, but i could also use the ajax class provided with adobe air. Which one should i better use it ? I've worked before with jQuery and so i'm more familiar with this library.
    Is there a difference between Adobe AIR AJAX Class and jQuery's AJAX ?
    Thank you,
    Alex

    I've seen a tutorial such as this:
    $("#loginbtn").click(function(){ 
    params = 'username='+$("#username").val()+'&password='+$("#password").val(); 
    request = new air.URLRequest(server + 'loginService.php'); 
    request.data = params; 
    request.method = air.URLRequestMethod.POST; 
    loader = new air.URLLoader(); 
    loader.addEventListener(air.Event.COMPLETE, loginComplete); 
    try { 
       loader.load(request); 
    } catch (error) { 
       alert("Error connecting to login server."); 
    and i am saying that you could do the same thing in jQuery.
    Is there any advantage in using AIR's AJAX Class ?
    Thank you for your support.
    Sincerely,
    Alex

  • AIR/Ajax support for gzipped HTTP response

    I run from one problem into another. I would like to fetch
    XML data from one site, but apparently it sends it gzip encoded.
    And it seems AIR/Ajax is not good with supporting this.
    I saw some workarounds for this in AIR/Flex (and Flash i
    suppose as well) by using some ActionScript code. Is there any
    option for AIR/Ajax ?
    Or maybe is there an option to setup URLRequest/URLLoader in
    a way it looks to external site as 'browser' that does not support
    gzip encoding ?

    I agree, it would be nice to have gzip encoding support in
    AIR's browser component. But, I looked at what my AIR app sends
    when it requests a web page, and it's not claiming to the remote
    server that it can support gzip. If the server is sending the
    content gzipped anyway, it's almost certainly broken. Web servers
    aren't supposed to dictate encodings. Clients say what they're
    capable of receiving, and servers send the data in that format if
    they're capable of sending any of the requested formats.
    I see only one exception in the spec.
    Section
    14.3 says the server is allowed to send what it likes if the
    client doesn't say what it wants (true for AIR) and it cannot
    support the default, which is to say, sending the raw data as it is
    on disk. So, is that the case? Can this server really not send raw
    data, to anyone, ever? If so, it's violating the spirit of the web,
    to the point that I'd say it's broken, even if the spec does allow
    it. And if the server really is capable of sending the raw data,
    it's
    really broken for insisting on sending it compressed when
    the client hasn't told it that it can handle it; this would
    actually be against the spec, not just against the spirit of the
    spec.
    It would seem a more sensible use of your time to fix the
    server than to go and learn another technology just to work around
    its brokenness.

  • Problem with adobe air ajax PUT request

    Hi,
    Sorry for my english.
    I would like to send a XML document to a server with AJAX
    XmlHttpRequest Object.
    I use the PUT method.
    Adobe Air sends the PUT request without the contents and set
    the contents-length header to 0.
    If I replace the PUT method by a POST method Adobe Air sends
    the request with the document, but the service on my server do not
    allow POST requests.
    If I open the same page with Firefox, IE and Safari, all
    works fine.
    I do not understand why Adobe Air is not able to send my xml
    document with a PUT request but he can if I replace the method PUT
    by a POST ?!?
    I cannot change the implementation of the remote service so I
    need to send a PUT request.
    I see an old topic here (
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=641&threadid=1309642#47 47452)
    speaking about my problem but I do not the right to add a message
    to the thread.
    Somebody can help me, please ?

    tzeng,
    The web server is a tomcat.
    Maybe the server is not configured to manage POST request or
    the service does not support the POST request (only PUT and GET).
    The AJAX code :
    quote:
    var xhr = new XMLHttpRequest();
    if (window.XMLHttpRequest) {
    try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
    } catch (e) {}
    // With Adobe Air, the following code Adobe AIR sends the PUT
    request without the document (in the data object).
    // if I replace "PUT" by "POST" all works fine
    xhr.open("PUT", url, true);
    xhr.onreadystatechange = function () {
    // my code [....]
    xhr.send(data);
    Thanks.

  • Simple AIR ajax question? One html file or many?

    I am a new ajax air developer and was wondering if it's a better practice to use one html file in my app or many html files? So far I have been testing with many html files using javascript location.href to send the user to another html page when they click different navigation buttons. This works although there is a clear webpage "loading" feel to the app due to a temporary white screen displaying over the app as it loads the next page (maybe for a couple milliseconds). Not a huge deal but still feels somewhat unprofessional since regular desktop apps do not have this "flicker" occur when changing navigation. Now if I use a single html file (where I load html using javascript) this does not occur but the file feels very large and bloated. Anyone have any suggestions of how I can eliminate the flicker that occurs using many files (perhaps I am not loading the file the correct way into the native window) or am I stuck with a single file if I want there to be no flicker?

    I'll say become a Flex/AIR developer

  • Is it possible to take a screenshot of monitor somehow in AIR (Ajax/XHTML)?

    I guess I have to use some flash libs, if someone can help me with this I will be very grateful.
    thanks

    It's possible and you do not need any additional libs. All you need is to monitor changes on Clipboard object as it's explained in http://www.psyked.co.uk/general-chit-chat/print-screen-detection-in-air.htm. It's written in AS3 but you can easily modified it to ajax/html.
    Cheers!

  • Adobe AIR + AJAX + PHP + MySQL

    Hi everybody!
    I've just tried building an AIR application out of an html file, which communicates to a MySQL database using AJAX with a post request on a php file.
    In the browser, the 'real' webapp works as intended, but when I build an AIR application, nothing happens when clicking on the send button.
    Does AIR not support this? Or am I missing something else here?

    You probably need to post a little bit more info on what your program do before people can help you.

  • Embbeding a transperent Flash into an Air Ajax Application

    I've got a html page with it nativeWindow transparent attribute set to true on top of that page I need to show swf file. The swf content only needs to be visible when the cursor is hovering over the edges rest of the time the swf needs to be invisible (meaning keeping the transparent window transparent). When I build the flash as an air app the transperency is perfect, but when I embed the swf into the the html document (using wmode="transparent") the transparency isn't there.
    Any help will be appreciated!

    Thanks for the help Joe,
    As you mentioned the problem is that the transparent part of the swf are opaque. When executing the swf as a standalone air app they are transparent but when embed into a html document as part of and Air app they are opaque
    Cheers

  • Two quick AIR(AJAX) questions.

    I've been working on developing an AIR interface for a web
    app that I've also been developing. It is necessary for my AIR app
    to minimize to the system tray (on Windows) so it's out of the way.
    I already have that functionality in place, however, I am
    having trouble finding a solution to capture the windows chrome
    minimize event, suppress it, and run my own minimize function.
    I am also wanting a single (or double, doesn't matter) click
    on the tray icon to restore the window. Again, I have the
    functionality in place, but am having trouble capturing the click
    event on the tray icon.
    I'm sure I'm just missing something about how AIR uses
    events, so if y'all would be so kind as to point me in the correct
    direction, I would appreciate it! Thanks!
    -Beau

    For the window minimize event:
    window.nativeWindow.addEventListener(air.NativeWindow.MINIMIZING,
    yourMinimizeFunction);
    function yourMinimizeFunction(event){
    event.preventDefault();
    For the Icon click:
    if(air.NativeApplication.supportsSystemTrayIcon){
    air.NativeApplication.nativeApplication.icon.addEventListener("click",
    clickHandler);
    } else if(air.NativeApplication.supportsDockIcon){
    air.NativeApplication.nativeApplication.addEventListener("invoke",
    clickHandler);
    Note that the events aren't symmetrical between Windows and
    Mac. Windows gives you mouse events, the Mac gives you an invoke
    event. Also, this code has not been checked, there may be typos,
    etc.

  • Calling web services using AIR html/ajax

    i want to call a webservice and currently using Adobe air
    ajax/html.
    can anybody please guide with some sample code like how to do
    that in adobe air?

    Does it have to be a double-you-ess-star "WebService"? If so,
    why? The whole WS* abortion was cooked up by CORBA/DCOM types who
    didn't actually get why the web works so well. They went and turned
    it into something that requires a heavyweight programming
    environment just to get started.
    If your web service -- lowercase letters -- is RESTful, you
    can call it from Ajax naturally. This is how most of the mashups on
    the web work. It's pure XHR, no AIR/Flex involved.

  • -webkit-linear-gradient not working with Adobe Air 3.0

    Hi -
    I recently downloaded Adobe Air 3.0 after reading that gradients are now supported (http://www.adobe.com/devnet/air/ajax/articles/air_and_webkit.html), but I have not been able to successfully implement them. For example, I have the following CSS class defined:
    .gradient_test {
         background-image: -webkit-linear-gradient(#68AB34, #3D721B);
         padding: 5px;
         color: #FFF;
    This should (and does in Chrome, Safari, etc) create a linear gradient going from light to dark green. But in Air it just appears as if no background has been applied to the selector. Am I missing some unique way to be able to apply gradients in Adobe Air 3.0?
    Thanks,
    Zach

    I don't know why this hasn't been addressed. I'm seeing the exact same problem. I've tried every permutation, but haven't been able to generate a gradient using any existing standard for webkit or otherwise (even though it's allegedly supported).
    -Matthew
    EDIT: I discovered that when the app is compiled, the gradients work fine. This one is driving my crazy, because I want to be able to test them. I get a mix of CSS support, depending on how the app is run.
    From Dreamweaver CS3 "Preview" - My CSS doesn't show gradients and shows embedded web fonts.
    From ADL - My CSS fails almost entirely, but some if it gets loaded.
    From the compiled AIR file: fortunately, everything seems to display correctly, but it's really a bad scenario for development / testing. Not sure what to do.

  • Make a screenshot in adobe air?

    Hello , how to make a screenshot and save it, in fact I saw a program called webkurt that does that please help me!

    You can only take a screenshot of content within the Adobe AIR application.
    If you are using Flex, you can use the JPEGEncoder class to encode a BitmapData object into a byte array of JPEG data.
    If you are using Flash, you can use the JPEGEncoder class found in the corelib project (http://code.google.com/p/as3corelib/).
    If you are using HTML, look at the code in this sample application: http://www.adobe.com/devnet/air/ajax/quickstart/jpeg_file_upload.html.

  • Dynamic forms in AIR/Flex

    OK, this is another of those "Is AIR the right tool for the job" questions. And I have zero previous exposure to Flash/Flex, just doing a fast forward through all available information, to reach an assessment.
    The app in question is mainly a vanilla database client (server component exists and has a ReSToid HTTP interface). It involves task lists, forms, all the ususal stuff and is glueing together a bunch of other (pre-existing) apps on the client  which are to be spawned from the glue app.
    In contrast to the legacy app which is to be replaced, the database structure shall be customizable per customer site and consequently have custom edit forms.
    Now, how to implement custom, dynamic forms in AIR/Flex? It seems logical to store the forms together with custom table in the database, but in which format? It is impossible to just store MXML forms, as Flex is a compiled language and I didn't find a hook to pull in extra MXML from an external source.
    Is there a Flex component turning an XML description of a form into a form on the screen, as mx:FlexNativeMenu can turn XML into a menu?
    Or am I looking into the wrong direction? It seems an AIR/Ajax soulution would be able to just pull the custom form in HTML from an external source and use it. But AIR/Flex is looking to be the friendlier and more productive environment....

    You can dynamically compose a form at runtime via as3.
    Here is a quick example.
    HTH.
    ps: afaik there is no component which automatically builds a form from xml.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">
    <mx:Script>
    <![CDATA[
         import mx.controls.TextInput;
         import mx.containers.FormItem;
         private function init():void {
              var formItem:FormItem = new FormItem();
              formItem.label = "FormItem1";
              var textInput:TextInput = new  TextInput();
              formItem.addChild(textInput);
              myForm.addChild(formItem);
    ]]>
    </mx:Script>
         <mx:Form id="myForm">
              <mx:FormHeading label="My Form"/>
         </mx:Form>
    </mx:Application>

  • Developers' Feedback on AIR

    Hello,
    I really like AIR and would like to get fellow developers
    onboard but it's kinda hard when I take them to the Adobe AIR
    website and things don't look as nice as they would other places.
    I'm going to share with you some of the things other developers are
    saying:
    * It's kinda difficult to get basic information or video
    clips on what air is all about.The basic introduction and major
    features are not clear.
    * Website colors are dull and not eye catching.
    * Flex seems a bit hard to understand and most of them think
    that it's difficult to use the Flash tool to create animations.
    That's it. This is some of the feedback I'm getting thus far.
    It's up to you guys to decide what you're going to do.
    Personally I would like to see a reduction in the distro size
    of AIR and speed improvement. It appears that AIR/Flash requires a
    lot of resources but I have never tested it fully. I would like to
    hear of other users' experience with running serveral AIR/Flash
    apps on a PC.
    I would also love for AIR to support greater data
    connectivity natively without the need to go throuh another Adobe
    Product or server:
    * MySQL
    * MSSQL
    * ODBC
    * POP3 Email support
    * SOAP connections
    * WebDAV/LDAP support
    * Ability to execute commands from AIR app
    * Ability to read/write to COM ports - this would make it
    great for working with robotics and other micro chip devices. For
    example: Home Automation, Device Timers, etc
    * Ability to connect with other servers or server backend
    scripts when streaming data. What if I don't have a flash media
    server and want yo send the the audio stream to be saved on my
    server with PHP?
    While it's possible to use low level socket to create these
    connections it's not something that most developers will be looking
    foward to in a framework. Lack of adequate data connections or
    support for such extensions will be a turn of for some developers.
    Anyway, you guys have done a great job with AIR thus far but
    I how you continue to push the system forward and at a much greater
    pace.
    PS. The video link on this page is not working for me in IE
    or firefox:
    http://www.adobe.com/devnet/air/ajax/articles/air_ajax_developers.html

    I think Adobe should be carefull in not extending AIR/Flex
    into all development areas. Some software projects are clearly not
    suited for AIR/Flex, and I think it should remain this way, or
    otherwise the clean and elegant model may soon be "poluted" with to
    many different things. Like a swish knife that does everything, but
    usually not as good as a dedicated tool.
    I currently see AIR/Flex as a replacement for the current
    AJAX interfaces that tries to mimic the desktop interfaces of our
    everyday OS. We need these kind of interfaces for many types of
    applications, and I think there is also a big need for it in the
    future, as we will base more and more applications in a distributed
    fashion, where we can take our environments with us anywhere.
    I've been working with AJAX long before the acronym was
    invented, and I can only say that it is scary how much work it
    actually requires to do even basic things. Besides, it's a model
    that is weak in many areas, like execution speed, cross-platform,
    browser artifacts, standardisation, etc.
    The HTML/JavaScript model model has been mature for
    replacement in many years now, and a lot of the AJAX desktop
    interfaces we see today, is what I would call totally overkill if
    we consider the work required to do them. I know there's libraries
    etc. that you can draw on, but these are not easily/naturallly
    extendable and will never be, if you compare to flex or similar
    fundamentally strong environments. AJAX is also quite difficult to
    scale to big applications - in other words, it's build on a pretty
    weak fundament.
    I think AIR/Flex has a great potential to develop into areas
    beyond my imagination, though I hope that Adobe will be very
    carefull in what they do to avoid spending time on areas that is
    better suited for other environments.
    So for the time beeing I see AIR/Flex as an AJAX killer,
    though it would be very critical if you marketed the framework as
    such. Many of the potential developers are still very pleased with
    their AJAX skills and applications, and they probably don't like
    the idea of killing those (yet). This is also why Adobe tries (very
    hard) to bridge the gap between Flex and AJAX - though in reality
    it would probably be easier to just trash the AJAX parts.
    Adobe created printers with their PostScript engines, and all
    we need now are monitors and TV sets with AIR/Flex engines -
    imagine the posibilities then ;-)

Maybe you are looking for

  • PS CC won't open raw files from my Nikon D600

    My camera is on the supported list...I've see others with the same problem here. I have the latest download of PScc, Bridge and Nikon Transfer.  I have the latest plug in from Camera Raw, 8.3.141 yet I cannot get the nef files to load in Camera Raw,

  • MacBook REALLY slow after Aperture install

    After I installed Aperture, my system slowed WAAAAY down. I'm talking as long as a minute to bring up a menu. I made sure that all import was finished, all previews made, and in fact at times the system works as before. But then, all of a sudden, som

  • Illustrator - exit code: 7

    I was originally on an imaged software bundle from my university, which I have since metriculated from. I have purchased the student/teacher licensing for CS5.5, Master Collection creative suite. Everything updated fine except for Illustrator - I hav

  • Audition VS. Soundbooth

    Hello, I just discovered this site..I've been writing in the beta forum so far. So I'll share want I said so far here: There are a lot of features in Audition that would be very useful in Soundbooth, simple things like running multiple instances of S

  • Does my mac prefer to be in a coma?

    I set it to wake up at a certain time and does not. Seems happy just sleeping away. Used to work. I have it wake up a minute before an online backup begins but that doesn't happen any more. I have worked with it about an hour, trying different times.