Posts tagged ‘Flex’

AIR 2.0 Native Process with Java program

This application demonstrates how to use AIR 2.0 Native Process with Java program. Air application sends String to Java program, Java program reads it and sends back to AIR app. Before packaging the ‘NativeProcessDemo’ application into an AIR file, make sure you have added the following line to application description file <supportedProfiles>extendedDesktop desktop</supportedProfiles>. Next, use command line tool to package an AIR app in a native installer.

Sample Files:
NativeProcessDemo.mxml (MXML, 12 KB), (JAVA, 1 KB)

Related Topics:

Custom Pipe Messages

Strongly typed messages are used to communicate between cores in PureMVC MultiCore application with Pipes Utility. Below is a simple example of a custom pipe message class, and a JunctionMediator using the custom message. Message names are defined in the message itself which makes the message handling very easy.

Make async call from Flex/PureMVC application

In this example I want to show you how to make asynchronous call to a web service from Flex/PureMVC application.
You can learn: how to call a web service from Proxy, convert returned xml into “smart VO’s”, notify the rest of the application about new data.


I have created round button skin for spark button component. RoundButtonSkin has the same shadow, fill, fill lowlight, fill highlight and the border color as ButtonSkin provided by Adobe. A major difference between my skin and Adobe’s skin is that RoundButtonSkin has a different shape – Ellipse.

Feel free to use it in your projects.

Creating a custom application updater

In above image you can see the custom application updater interface I have created for my NoteList application. You would see this updater interface only if updated application is available for download. Clicking the ‘Download and Upload’ button downloads updated .air file and updates current application.
Read more, view source code

Tracking user presence

Adobe AIR applications can detect if user is actively using a computer. The NativeApplication object dispatches two events:
userIdle event – user is not using a computer,
userPresent event – user is using a computer again.
The following lines of code set the idle threshold to 20 seconds and listen for both the userIdle and userPresent events:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="" layout="absolute"
    creationComplete="init()" viewSourceURL="srcview/index.html"> 

            private function init():void
                nativeApplication.idleThreshold = 20;
                nativeApplication.addEventListener(Event.USER_IDLE, userIdleHandler);
                nativeApplication.addEventListener(Event.USER_PRESENT, userPresentHandler);

            private function userIdleHandler(event:Event):void

            private function userPresentHandler(event:Event):void


Auto select New Item in Tree component

There are plenty examples out there on how to add and remove leaf nodes from a Tree control at run time, one of my favorite is Working with tree controls tutorial by Adobe.

Now it’s time to learn more advanced stuff: auto select for new created item. This would be very easy to accomplish with List control. You would probably use ArrayCollection as a dataProvider, call addItem(item:Object), keep track of that item index, and then use list.selectedIndex = index. 

Unfortunately this is not easy with Tree control. Tree control could have opened and closed nodes. If the nodes in the tree control are collapsed, the selectedIndex is different than when all the nodes are expanded. Instead of using selectedIndex you want to loop through all nodes to find a new item’s index.

Jump into code

Missing BitmapData class in code completion – Flex(FP10)

I’ve setup my Flex Builder for Flex 3.3 SDK and Flash Player 10 as described in this article. I noticed that BitmapData class doesn’t show anymore.

Any thoughts on this?

Above Problem Solved. (Updated)

Read the Flex 3.3 SDK

You need to:
1. Download Flex SDK zip file.
2. Uninstall current Flash Player.
3. Install Flash Player from /runtimes/player/10/win/

Thanks to the Flex Community(Michael Borbor).


Downloading and Saving Images to the desktop with AIR

In this example i want to show you how to download remote image(jpg or png) and save it to the desktop.

Continue reading ‘Downloading and Saving Images to the desktop with AIR’ »

Flex 3 / ActionScript 3 posters in JPG format

Each file is about 4MB, 2639×3949 pixels. Download posters(zip file)

You can order a set of Flex, AIR, and ActionScript posters(2 feet by 3 feet) from Adobe website.

NOTE: you need to have an Adobe ID and a valid Flex 3 serial number to order them

PDF versions appeared again on