Posts tagged ‘Flex 4’

MemberDatabase – AIR application (Flex/PureMVC)

This demo illustrates how you can use Flex, PureMVC and Adobe AIR local SQL database to create simple member management system. With the Member Database you can store unlimited number of members, sort any information in the database and export data to xml file.

Sample Files:
MemberDatabase.zip (ZIP, 647 KB)

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

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.

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();
}