-->
Register FREE for Streaming Media Connect, May 20-22. Save your seat TODAY!

Building Video Apps With Adobe AIR

Creating a Video-Enabled Application Using Adobe Flex and Adobe AIR
To create this next application, you need to have Adobe Flex Beta 3 installed, and you need the same FLV file you used in the earlier example. To build an application in Flex, you’ll need to create two separate files: an MXML file, which declaratively defines the application user interface elements, or "chrome," in an XML-based language, and an ActionScript file (XML file) that defines client logic and procedural control. You write both MXML and ActionScript source code using the Flex Builder IDE, and then you compile it with the Flex compiler to produce a binary file with an SWF extension.

Note that the following code is for AIR beta 2.
1. Click the Flex Builder 3 icon to launch the application.
2. Select File > New > AIR Project. The Create New AIR Project set-up screen opens.
3. In the Project Name text box, enter DragDropVideo and click Next.
4. Leave the default settings and click Finish. Flex Builder creates a new project that includes an MXML file, which contains the application logic, and an XML file, which describes the windows chrome.
5. In the Navigator on the left side, select DragDropVideo.xml. Copy and paste the code available at www.helpexamples.com/flash/video into the Source view to the right to define the appearance of your application, including windows chrome.
6. Next, select DragDropVideo-app.mxml. In the Source view on the right, copy and paste the code available at www.helpexamples.com/flash/video to define the logic behind your application.
7. Select Project > Export AIR Package. The Adobe AIR Package Contents screen opens.
8. Change the Save as location to your desktop, and leave all other settings in their default state.
9. Click Finish.

Installing and Launching Your Application Built on Adobe AIR Now it’s time to install, launch, and actually use the application.
1. Navigate to the DragDropVideo.air file on your desktop and double-click it to launch the application Installer.
2. Follow the Installation instructions, selecting the Start application after installation checkbox in the second installation screen.
3. You’ll see the application window open, with the application title DragDropVideo.
4. Drag and drop the FLV file from your desktop onto the application window. The video begins playing.
Looking Ahead at Developing RIAs and Applications Built on Adobe AIR
This article provided a quick tour of Adobe AIR and some of the new tools developers have for packaging web-based applications for the desktop. It also offers a glimpse into the advantages of better integrating video and desktop applications to reach audiences with more engaging, relevant content.

It is likely that many applications built on Adobe AIR will be developed alongside web-based applications, letting developers extend the reach of their applications to the desktop and giving users rich application experiences—online or offline. Regardless of the approach, the ability to more easily and reliably integrate video into applications opens the door to new revenue paths for businesses, to stronger customer relationships, and to better user experiences.

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues