Daniel Dura

All About the Adobe Flash Platform

Archive for the ‘AIR’ Category

TwitterCamp at Web 2.0 Expo 2007

with one comment

TwitterCamp at Web 2.0 ExpoMike Chambers just got back from his session at the Web 2.0 Expo here in San Francisco and told me that he saw the TwitterCamp application in use! Here is a photo. All the credit goes to Ryan Stewart and Brady Forrest for making this happen. If you have any photos or video of TwitterCamp in action at Web 2.0 Expo, or at your own event, I would appreciate the links and will add them to the TwitterCamp page.

Written by Daniel Dura

April 16th, 2007 at 12:16 pm

Posted in AIR,Flex

ApolloCamp Twitter Application Open Sourced

with 4 comments

TwitterCamp in action.

Today I released the source code for the ApolloCamp Twitter application that we used at ApolloCamp last month. This Apollo application ran on a desktop which was connected to a plasma display and a projector. Attendees could get a ‘birds-eye’ view of the tweets that were being sent to the ApolloCamp Twitter account. I built the application in about two days which is a testament to the Flex Framework and Apollo. I should also thank the guys over at Twitter who helped us get this application working and gave us technical support using their API as well as Ely Greenfield for his great SuperImage component.

We were not sure how well the idea of using Twitter as a conference back channel would go over with the attendees. We found out that it works amazingly well! When attendees found issues with the venue or wanted to praise one of the speakers, they would Twitter the message and it would appear on the big screen inside the application. This not only facilitated great communication between attendees, but helped us as organizers stay apprised of what we needed to do to make the conference successful. I have now made the application and source available so that if you are hosting a conference or user group meeting, you can use and customize this application and display all Twitters for your Twitter account. If you don’t have a Twitter account already, you should set one up. You can view my Twitter profile and add me as a friend to keep up with what I am doing. Also make sure and add ApolloCamp as a friend, he is a little dormant right now, but we will probably start posting on that account soon to let you know what is up with the Apollo team.

The source for the application is available by visiting this page. You should be able to customize the application and graphics to fit your needs, or just use the application on your desktop for your personal use. It is built using Flex and Apollo.

If you have any questions about this application, please use the comments on the TwitterCamp page. For more urgent issues email me, but realize that I may not respond right away (I am consistently about 1000 emails behind, if someone can build an Apollo app that solves that problem, you would be a lifesaver!)

Written by Daniel Dura

April 10th, 2007 at 9:31 am

Posted in AIR,Flex

Apollo Multi-Window Support using Flex

with 12 comments

One of the most exciting features of Apollo is support for applications which have multiple native windows. Currently when using Flex in the browser, you are limited to using PopUpManager or rolling your own MDI architecture. With Apollo, your application can look more like, well… a native application. Each window will appear in the task bar on Windows, have a tab and z-order, etc.

An existing issue in the Apollo alpha that you may struggle with if you are doing Flex development, is that the Flex Framework does not currently support Apollo’s NativeWindow implementation. The issue stems from the fact that now your Apollo application can have multiple stages and the Flex framework which was originally developed for the browser player doesn’t take this into consideration. Right now if you try to add Flex content, such as a custom Flex component, to a new windows stage you will get unexpected and broken behavior.

Now, I wouldn’t bring this up unless I had a solution. But before I show you that, a few caveats: a future release of the Flex Framework will formally support multiple windows. If you are looking at this article and there is currently a post-alpha Apollo release, please check the docs first to see if Flex officially supports multiple native windows. Another caveat: You will still run into a few issues and bugs when using this technique. For example, PopUpManager may not work properly in new NativeWindow instances.

On to the code (the comments should explain what is going on):

Read the rest of this entry »

Written by Daniel Dura

March 30th, 2007 at 8:01 am

Posted in AIR,Flex,Tutorial

Apollo Native File Dialogs

with 6 comments

Currently the Apollo Alpha doesn’t support native file dialog boxes (it will before the final official release.) Despite that, there is a way to get this functionality now by using existing Flash Player APIs.

I will first show how to display a file ‘Save’ dialog box which allows the user to specify the name of the file they would like to write to the disk. This will allow them to type in the name of a file that may not exist. The user can also select a file that already exists and the dialog will prompt the user that they are about to replace that file on the system.

To accomplish this in Apollo, you use the ‘download’ method on the flash.net.FileReference class. Because the flash.filesystem.File class extends FileReference, you can employ this technique by using that class as well. The trick to getting the File reference without actually downloading the file is to cancel the URLRequest before it executes. See the code below for an example:
Read the rest of this entry »

Written by Daniel Dura

March 29th, 2007 at 6:24 am