adobe air

create a thumbnail of an image in actionscript

Assume test1.jpg is the original file and test1_thumb.jpg is the thumbnail file to be created. The width or height of the thumbnail is of maximal size 100. private function loadBMP():void { loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on
Xu Cui
34 sec read

upload a file with php and AIR

Let’s say you want to upload a file to your server with your AIR program (using File.upload). On the server side you have a php script to handle the file uploading. A very common mistake is that the name of the file field in your AIR (by defaul
Xu Cui
24 sec read

includeInLayout hide/show a component

Let’s say you have a Label and you want to show this label only when condition == true, you may do this: <mx:VBox> ... other components ... <mx:Label text="this is label" visible="{condition}"/> ... other compone
Xu Cui
20 sec read

Learning Employee Directory: How to add a field to…

Return to table of contents Let’s say you want to modify Employee Directory for your own company and you want to add another filed (fax) to the employee data. How to do this? In EmployeePanelDetail.mxml, add the following block. <!-- fax --&
Xu Cui
55 sec read

Adobe AIR error #3132

You may get this error: could not convert text value to numeric value. Error #3132: Data type mismatch. People have discussed this error related to date column. Here is another case where this error could happen: when a column in sqlite is BIGINT and
Xu Cui
17 sec read

Limits in Adobe AIR and sqlite

int in Adobe AIR takes value -2,147,483,648 (-2^31) to 2,147,483,647 (2^31-1). integer (primary key) in sqlite takes value -9,223,372,036,854,775,808 (-2^63) to 9,223,372,036,854,775,807 (2^63-1). (source)
Xu Cui
4 sec read

Learning Employee Directory Series

Employee Directory is an AIR sample application from which I learned a lot. (try it) Here I post some of what I learned here. 1. introduction 2. structure 2.1 singleton 2.2 command 2.3 Cairngorm 3. ui 3.1 style 3.2 size 3.3 component 4. flow 5 events
Xu Cui
10 sec read

Adobe AIR error 303

You may get a 303 error when trying to use custom icons in your AIR application (even when your icon files are in the right place). Solution: Assume you are using Flex Builder. First move your icon files out of your source directory (e.g. move to Des
Xu Cui
19 sec read

blackScreen, a program reminding you to relax

blackScreen has a simple function: it makes your computer screen black every 30 min (changable) so you can walk around and relax your eyes. To install, go to Adobe AIR marketplace and click INSTALL NOW. Or, you can follow the steps below: Download an
Xu Cui
22 sec read