Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-28-2008, 11:11 PM   #1
dygfloyd
Registered User
 
Join Date: Mar 2008
Posts: 7
Default Desktop File Browser Application

Hey everyone,

I am a Flash developer who has been asked by a client to make a CD-ROM that will display a list of files like PDF's and Word files. No problem.

But, then they asked if I could make it a desktop application that the user will install. When it is installed, it will copy all the PDF and Word files to the users desktop so the application could be run without the CD. Each time the user opens the application, it will talk to a web service, see if new versions of the files are available, download them and then run the application normally. If the user is not online, the check will fail but the application will run normally using the local data.

Ok, as a "web only" guy, this just melted my brain. So, I thought I would get a few opinions the pro's. (aka: the people reading this forum.)

1. First, is this even possible using AIR, Flex or some other combination of Adobe stuff. (I'd really like to avoid making a WinForms application.)
2. If it is possible, how difficult is it? Could an experienced Air Developer write it in a few hours? Or would it take 200 hours plus I would need to purchase 3 plug ins, a new application and a monkey?
3. Is this even a good idea or am I trying to fit a square peg into a round hole?

Just thought I would get a few opinions before I start putting together estimates.

Thanks for your feedback!

Steve
dygfloyd is offline   Reply With Quote
Old 03-30-2008, 09:30 PM   #2
evride
2006 Man Of The Year
 
evride's Avatar
 
Join Date: Mar 2007
Posts: 880
Default

this is absolutely possible with air. it wouldn't be something that you can create in a couple of hours tho. if you are experienced like you say you are it will take a week or two to get acquainted to the AIR classes and then another 2 or 5 weeks to actually code it depending on how much time you work on it and how determined and or skilled you are. I'm a 5PM to 10PM coder who also uses that time to do other stuff too so my time estimate may be different from your results.

you do NOT need to buy a new product if you already have Dreamweaver CS3 and/or Flash CS3. no monkey is needed and no purchasing of plugins is required. just download the freely available AIR sdk for flash, flex or dreamweaver.

bookmark this page: http://livedocs.adobe.com/air/1/devappsflash/
you will be using it A LOT.

what i would do is this. have a MySQL table on your server for timestamps locations and whatnot for your files just in case you add or delete or change the file name of a file.
the AIR app would check for updates with a php script on the server. if there are updates the air app downloads the new file versions and write it to disc in a folder on the desktop. the flash code for that would look like this:

ActionScript Code:
var urlString:String = "http://example.com/files/dude.txt"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); function loaded(event:Event):void {     urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);     writeFile(); } function writeFile():void {    var dir:File = File.desktopDirectory.resolvePath("DownloadedFiles");    dir.createDirectory();    var file:File = dir.resolvePath("dude.txt");     var fileStream:FileStream = new FileStream()     fileStream.open(file, FileMode.WRITE);     fileStream.writeBytes(fileData, 0, fileData.length);     fileStream.close();     trace("The AIR file is written."); }

you may want to use SQLite to keep track of files or you can just use the File class to get data about the files.

Last edited by evride; 03-30-2008 at 09:32 PM..
evride is offline   Reply With Quote
Old 03-31-2008, 07:23 PM   #3
dygfloyd
Registered User
 
Join Date: Mar 2008
Posts: 7
Default

This is perfect. I am definately NOT an expert at anything other than Flash. If we get this job, there is a good chance, I'll be looking for a contractor.

Anyone else have any thoughts?
dygfloyd is offline   Reply With Quote
Old 12-18-2008, 05:06 PM   #4
harborbay
Registered User
 
Join Date: Jul 2007
Posts: 2
Default

Evdog-- thank you so much for the snippet. I was trying to solve exactly the same problem, and you saved me hours of work.

David
harborbay is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I open a local file through a web-based Flash app? rfan622 ActionScript 2.0 2 09-29-2008 12:39 PM
Adding file upload functionality to an application zijian60 ActionScript 2.0 0 01-23-2008 06:18 PM
File Browser arnet11 ActionScript 2.0 0 03-12-2007 10:26 AM
Calling an event in application from .as class file vistasoul Flex 2 & 3 2 02-02-2007 11:24 PM
Browser, Media Player, File Organizer, Word Processor sycross ActionScript 1.0 (and below) 3 06-17-2006 08:24 PM


All times are GMT. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.