Daniel Dura

All About the Adobe Flash Platform

Archive for the ‘Platforms’ Category

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

New AS3 XMPP Library on Adobe Labs

with 6 comments

Almost a year ago I began working on an XMPP library using ActionScript 3. XMPP is a protocol which enables real-time collaboration and presence information to be communicated between clients. (For more information about XMPP see http://www.xmpp.org.) With the new Socket API in Flash Player 9, writing a formal XMPP protocol library in ActionScript was much easier than it was in previous versions of the player and showcased some of the new features of the ActionScript 3 language. I decided to start to write one from scratch.

I have submitted this library to the Adobe Labs repository. You can browse the repository using the link below. The path to the source is ‘projects/xmpp’ in the ‘flashplatform’ repository. Christian Cantrell has also made a great post on his blog that describes how to checkout the latest code here.

Over the past year I have made many optimizations and feature additions to the code base and I am still actively developing the library. If you have any suggestions, questions, or patches related to this library, please feel free to email me directly (ddura@adobe.com).

  • Browse the source here.
  • Download the latest nightly drop of source from the Adobe Labs repository here. (This contains the entire labs source tree.)

Update: The code for this library has been moved to Google Code, where some bug fixes and changes have occured. Be sure to update to that version. Link

Written by ddura

November 30th, 2006 at 2:41 pm

Posted in Actionscript,Flex

ASDoc Now on Labs

with 3 comments

A version of ASDoc that we use internally for generating our documentation is now available on Adobe Labs.

Written by ddura

August 14th, 2006 at 10:31 am

Posted in Actionscript,Flex

It’s True – A Free Flex SDK

without comments

You may have seen the news swirling around CNET and a few blogs. I can confirm that what they say is true. Rub your eyes and read the statement again if you must. Most of these news outlets jumped the gun on the announcement, not that I can blame them. I have had a hard time keeping this news quiet myself.

Part of the pricing model for Flex 2 will include a free SDK which contains a command line compiler and documentation. It will also allow you to develop, compile, and deploy Flex applications with no additional server or licensing requirements. There is not a lot more we can say right now but as we get closer to the final release you should see more news about this.

The other part of the announcement is that we will be releasing the Flex 2 Beta and the first public release of the Flex Enterprise Services Server Beta on Adobe Labs very very soon. I really don’t want the free SDK to overshadow how amazingly awesome these releases are. Overall this is a huge update for Flex Builder as well as many changes and enhancements in the language and framework. I will outline these changes in a later post. For now, start freeing up some time to start playing with the updated Flex 2 Beta.

Written by ddura

January 31st, 2006 at 3:23 pm

Posted in Flex

Flash, Ajax, and Ruby on Rails Integration Screencast

without comments

As noted by many people last week, Adaptive Path (who coined the term Ajax) has released an amazing new Flash based slider component that can be controlled via JavaScript, much like the Yahoo! Maps API. The component is utilizing the Flash JavaScript Integration Kit that was released a few months ago which Christian, Mike and I have worked on.

Yesterday, while I was browsing some of the Ruby on Rails blogs, I came across this post. In it, Rick Olson (also known as Rails Weenie) demonstrates in a screencast how you can integrate this new slider component into a Ruby on Rails application using a Rails plugin.

It is great to see all of these technologies integrated seamlessly like this. This screencast also illustrates the fact that Flash and Ajax do not neccesarily have to be mortal enemies bent on destroying the other. Sometimes the debate has been positioned this way, which is a shame. There is no doubt that there is a place for each technology and sometimes they will intersect in interesting and wonderful ways that benefit the end user and thier interaction with your application.

Written by ddura

January 17th, 2006 at 10:13 am

Search for Your Sketch

without comments

Every once in a while you get a link to a site that you have to send around, or blog in my particular case. The application is called Retrievr and by its unique spelling it is obvious that it is related to Flickr. What is not so obvious is how addictive this application is once you get a handle on it.

In a nutshell, it provides a unique search interface for a subset of flickr photos. By sketching out a drawing using a Flash based widget embedded in the page, the application makes calls to an algorithm that matches your drawing, colors and all, to photos retrieved from the Flickr database. It makes use of AJAX to incrementally make calls to the service so that as you are drawing your sketch you can see your results updated in real time.

I love to see applications like this that take advantage of numerous ‘Web 2.0′ technologies and ideas to subtly combine them in this way (I could write an entire post on how many indiscriminate uses of tags I have seen in the past few months.) The site and interface is clean, and it just works how you would expect. No fluff, just a great application that is a lot of fun to play with.

Written by ddura

January 3rd, 2006 at 5:12 pm

Posted in Flash,Showcase

Google Reader and Flash

with 7 comments

Here at Web 2.0, the guys at Google Labs just released a web based news aggregator called Google Reader. It looks pretty usable from the 30 seconds I spent with it so far. What is even better is that it will aggregate podcasts and allows you to listen to the podcast in the page using Flash!

Written by ddura

October 7th, 2005 at 10:55 am

Posted in Flash,Web 2.0

CNN Video

with 4 comments

CNN has started offering free video streams and is delivering the video via Flash Video. It looks very well done and is a great example of how Flash Video can enhance existing video services. Now if they would just use Flash in the popup version of the video player.

View the videos here.

Written by ddura

June 19th, 2005 at 11:54 pm

Posted in Flash Video,Showcase

Nokia Announces Seven New Flash Enabled Phones

with 4 comments

There is no doubt that the number of Flash enabled handsets has increased dramatically during the last 12 months. The ramifications for Flash developers are very clear. More Flash Enabled Phones = Greater Demand for Flash Developers. If you are interested in developing for Flash Lite enabled handsets, download the free Flash Lite CDK or visit the Flash Lite product page.

Via Digital-Lifestyles.info: “In a veritable orgy of mobile manufacturing, Nokia has launched a grand total of seven new handsets, including a dual camera 3G device and their most feature-rich CDMA phone yet.

Four of the models use the ‘Matrix-style’ sliding design, which features a keyboard which slides out from under the display.

The phones are powered by the somewhat elderly Series 40 user interface, although the latest version of the O/S cranks up the eye candy, adds a new “Active Standby” home screen and bundles in support for applications written in Macromedia Flash Lite.”

Written by ddura

June 14th, 2005 at 12:24 pm

Posted in Flash Lite