Home Tutorials Forums Articles Blogs Movies Library Employment Press

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

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-15-2010, 07:38 PM   #1
gazuraz
Senior Member
 
Join Date: Dec 2008
Location: Serbia/ Smederevo
Posts: 297
Default Is there a way I can list and rename files in folder using only flash whit AIR or ZIN

This afternoon I got an interesting project order from my employer... Now, there is some fancy party going on and there will be a lot of photographers attending. All of the photographers shall have a wireless connection between their cams and laptop. Once some of the photographers take a shot, that picture will be automatically sent to predefined folder on laptop. That part of the job is already done. My end of work will be to create a flash application (zinc or air) that will show newest photo on some huge display behind the DJ. Normally for this kind a thing I would install WAPM server and use php directory listing, print that list it in XML and then read it in flash. Bath when I suggested that solution, my employer was not satisfied... They are in need of practically "plug and play" solution... So my question Is there a way I can list and rename files in folder using only flash whit AIR or ZINC ?
gazuraz is offline   Reply With Quote
Old 06-15-2010, 08:28 PM   #2
gazuraz
Senior Member
 
Join Date: Dec 2008
Location: Serbia/ Smederevo
Posts: 297
Default

Quote:
Originally Posted by gazuraz View Post
This afternoon I got an interesting project order from my employer... Now, there is some fancy party going on and there will be a lot of photographers attending. All of the photographers shall have a wireless connection between their cams and laptop. Once some of the photographers take a shot, that picture will be automatically sent to predefined folder on laptop. That part of the job is already done. My end of work will be to create a flash application (zinc or air) that will show newest photo on some huge display behind the DJ. Normally for this kind a thing I would install WAPM server and use php directory listing, print that list it in XML and then read it in flash. Bath when I suggested that solution, my employer was not satisfied... They are in need of practically "plug and play" solution... So my question Is there a way I can list and rename files in folder using only flash whit AIR or ZINC ?
Actually my tong was faster than my brain... I thought for a wile and I remembered that I read something about flash.filesystem.File

Any way problem solved...

ActionScript Code:
import flash.filesystem.File; function browse(event:MouseEvent):void {     var file:File = new File();     file.addEventListener(Event.SELECT,onDirSel);     file.browseForDirectory(" Browse For Dir "); } function onDirSel(event:Event):void {     var fR:File=event.target as File;     addEventListener(Event.ENTER_FRAME, loop);     function loop(e:Event) {         var dirL:Array=fR.getDirectoryListing();         var files:Array = new Array();         files = dirL;         output.text="";         for each (var file:File in files) {             if (! file.isDirectory) {                 output.appendText(file.name + "\n");             }         }     } } bro.addEventListener(MouseEvent.CLICK, browse);
gazuraz 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


All times are GMT. The time now is 11:28 AM.

///
Follow actionscriptorg on Twitter

 


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