2 Replies Latest reply on Dec 12, 2007 1:44 AM by Garyl Woolworth

    Beginner Flex2 / AS3 question

    Xamublack Level 1
      I am a beginner by all respects and have decided to develop an FTP via browser application for my company website in my free time. Before I buy a few Flex 2 and Actionscript books for myself and dive in, I figured it might be smart to ask the community if its even possible or recommended.

      Can you (should you) use Flex2 / AS3 as the basis for a drag and drop .ftp through browser application? If so, feel free to advise me on any Flex packages or methods to use as a basis and I can place emphasis on that in my learning.
        • 1. Re: Beginner Flex2 / AS3 question
          peterent Level 2
          There are two things you want to do which are not possible with the Flash Player: dragging something from the desktop onto the player and reading files from the local disk. The Flash Player has a number of security restrictions which make the player one of the safest things you can download over the web.

          However, you can probably use AIR - available with Flex 3. AIR is the "Adobe Integrated Runtime" a sort of Flash Player for the desktop. AIR applications, which use Flex controls and ActionScript, has the capability of reading local files and you can drag items from the desktop onto AIR apps.

          Check out labs.adobe.com to get a copy of Flex 3.
          • 2. Re: Beginner Flex2 / AS3 question
            Garyl Woolworth Level 1
            One thing I'd like to point out, generally I'm all for recreating something on my own but for something on that magnitude I'd suggest checking out this link, someone has already pretty much created what you need to accomplish. http://www.onflex.org/ted/2007/05/flexftp-ftp-client-in-flex-using.php obviously if your not using PHP you can change the server side around to reflect your needs but the source there has already tackled some of the major issues of a(n) FTP client in Flex. One of the biggest ones is with sockets you don't know when it's full so you constantly need to clear it. However if you were to use the FileReference classes (based on HTTP protocol) your going to need to configure your server to allow large buffer sizes for files to be uploaded as well as setup long timeouts. The other drawback is using sockets theres no way to create a true progress of what's been done. Just my two cents. Hope this helps.