Monday, November 2, 2009

EXIF Reader in Flex+AIR

Hi
I was posting some images on a blog, and I required to post the EXIF tags info there. It was a tedious job typing all those values, and I thought then to make a app that would do this for me.
First I tried .net, then on a search came to know of the EXIF Reader available on google code.

I then created this app for reading the EXIF tags on a image file using Flex and AIR. I will be posting the step by process I used for development.

Let me know if there are any issues or suggestions....

Step One: File and Folder Selection
The first step was to allow for file and folder selection. I used the FileSystemTree Component(AIR Only) for this purpose.
I added two buttons for file and folder selection and accordingly modified the FileSystemTree.



The mxml code for this :



<mx:FileSystemTree id="fsTree" enabled="false" showIcons="true" fileChoose="onChooseFile(event)" x="10" y="36" width="482" height="460"/>
<mx:Button id="fileBtn" x="103" y="504" label="Select A File" click="openDialogFile()"/>
<mx:Button id="folderBtn" x="275" y="504" label="Select A Folder" click="openDialogFolder()"/>



The methods for the file and folder selection are:



private function openDialogFile():void{
fsTree.enumerationMode = "filesAndDirectories"
fsTree.enabled = true;
fsTree.allowMultipleSelection=true;
fileBtn.enabled = false;
folderBtn.enabled = true;
}
private function openDialogFolder():void{
fsTree.enumerationMode="directoriesOnly";
fsTree.enabled = true;
fsTree.allowMultipleSelection=false;
fileBtn.enabled = true;
folderBtn.enabled = false;
}


This allows for file and folder selection.




1 comment:

Brijesh said...

Interesting post.. can u post the link to the application..