Resumable File Downloader – Simple AIR app

This AIR application demonstrates how to download, pause and resume downloads of larger files(mp3, flv, etc) and save to the user’s computer. Big Thanks to Benjamin Dobler for his blog post Resumable Downloads with AIR.

Sample Files:
ResumableDownloader.air (AIR, 524 KB)

Sending messages from server socket to client sockets

In this example i want to show you how to send messages from server socket(AIR app) to client sockets(AIR apps). You can install all 3 applications on the same computer or ServerSocketDemo.air on the server(it could be your mac or pc) and SocketDemo.air on any other computer on your local area network(LAN).

NOTE: You will need AIR 2 BETA – Download the Runtime

Files: ServerSocketDemo.air, SocketDemo.air, SocketDemo2.air
Source Codes: ServerSocketDemo.mxml, SocketDemo.mxml

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.

ContactMessage.as

Export Data to Excel File

In this example i want to show you how to write data to Excel file from a Flex application. I use as3xls library and FileReference.save() method in Flash Player 10.

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.

Setting cursor position at the end of a TextInput control

Below code shows you how to set cursor position at the end of a TextInput control in Flex 4.

import mx.events.FlexEvent;

// Flex 4
private function creationComplete(event:FlexEvent):void
{
    textInput.selectRange(textInput.text.length, textInput.text.length);
    textInput.setFocus();
}

RoundButtonSkin

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

Simple Notes Manager

Let me introduce to you application I have built for myself – NoteList. It is an Adobe Air app which allows you to manage notes in a simple efficient way. I would say “it is a notepad with a list of notes(text files)”. The application has simple interface: “+” button (add note), “-” button (remove note), sidebar and text area.

I will be happy to tell you that i have been using this application quite often.

You can install application from here: NoteList

Transmitting JSON from PHP to Flex

Learn how to create JSON(JavaScript Object Notation) with PHP and display in Flex application.

Continue reading ‘Transmitting JSON from PHP to Flex’ »