Adobe AIR Window Ball Toss Example

Yes I’m still having fun with native windows. In this example I create a second native window and position it next to the main window. You can then throw a ball around between the two windows. I modified some physics code taken from Keith Peter’s Actionscript Animation book for this example. You can download the AIR file as well as the full source. This was created using the new Flash CS3 AIR support.


Lee

OnAIR Bus Tour Highlight Video (Leg 1)

I’m finally releasing my highlights video from leg 1 of the OnAIR Bus Tour. This video combines all of the webcam photos taken on the bus with a bunch of live action footage that I shot over the 2 weeks. Hope you enjoy it. Oh and there are still a bunch of tour stops left so go on over and register and maybe we’ll see you in the next highlight reel.

You can see the video here.

Lee :-)

Adobe AIR SpringyWindows Example

Here is a fun little example that I made tonight that applies spring physics to 4 native windows. This example was created using Flash CS3 and Grant Skinner’s AIR panel. The main application window spawns 3 new windows and then all of their positions are continuously updated using an EnterFrame event. Once launching the app, move the window with the blue background around the desktop to see the springy action.


You can download the AIR file as well as the source FLA file.

Enjoy!
Lee

The Inside Scoop on Native Windows in AIR

I’ve been doing quite a bit of work with AIR lately and I have learned a ton of things about how to get the most out of the technology. One such area is dealing with native windows. Native windows are just another name for the standard application windows that most applications on your OS use. You can launch native windows in AIR from Javascript, Flash, or Flash and you can set a whole slew of options on them. I have had a lot fun with these windows in some of my earlier experiments which you can check out here and here.

Well one of the things that I wanted to be able to do with native windows is to be able to set the z order of any windows that I spawned. The guys on the bus tour mentioned in their presentations that there was going to be support added for this but that it was not in the current beta. Well it turns out that it IS in the beta if you use the Flex Window control rather than using NativeWindow.The Window component essentially just wraps the NativeWindow and adds some helpful features to it. The z indexing support is not as powerful as the display list inside of Flash but it has some useful methods for playing with spawned windows. Below is a rundown of the available methods as well as how to instantiate the Window component.

Anyway, play around with this and let me know how it works as I haven’t actually tried calling these methods yet. I have an experiment in the works which will test these out though.

Lee

OnAIR Bus Tour Leg 2 Starts Tomorrow!

Tomorrow marks the start of leg 2 of the OnAIR Bus Tour. The first stop is in Atlanta with a full day of sessions, snacks, and video games. If you live anywhere on the east coast then go over to the website and register for an event. They cost nothing to attend and you receive free software, food, and beer in addition to hearing all the latest and greatest from the AIR team.

I have to admit that I am writing this post with a certain degree of jealously, as I will not be a part of leg 2. What are you going to do? Some of us have real jobs to go to :-)

Register now!
Lee

OnAIR Bus Tour Raw Footage (Tape 2)

Here is the raw footage from tape 2…

Lee

OnAIR Bus Tour Raw Footage!

A little earlier tonight I broadcast a live stream of the raw footage that I shot on the bus. Thanks to the coolness of UStream, I also recorded the live stream. You can check it out below. Guest stars include Robert Scoble and Kevin Lynch. Enjoy :)

Lee

Calling an AS function from JS in a Flex-based AIR app

Wow that title is a mouthful! I was recently presented with the need to call an Actionscript function from Javascript that was embedded in an HTML control in a Flex-based AIR application. It isn’t quite as easy as doing something like runtime.myASFunction();. Luckily the guys on the AIR team were able to send me the solution. It actually requires two steps in order to get it working.

First off you need to set the domain for the HTML control before you set the location. You do that using the code below. In this example my HTML control has an id of html:

  1. import flash.system.ApplicationDomain;
  2. html.useApplicationDomain = ApplicationDomain.currentDomain;

Now you are ready to call the function from your JS code. To do that you need to use the following syntax:

  1. runtime.mx.core.Application.application.myASFunction();

This could be made much easier but for now it will get the job done.

Lee

Adobe AIR Cheatsheets!

Sean Moore has created an excellent resource for Adobe AIR development. These cheat sheets can be viewed in PDF form or can be printed for offline viewing. While you are on Sean’s site be sure to check out his other excellent cheat sheets.

Lee

Adobe AIR SpitEmOut Video Example

This is another cool example I made during my time on the On AIR Bus Tour. This example was built using Flash CS3 and requires Grant Skinner’s AIRPanel extension in order to compile the application. It also uses the Tweener AS3 library to accomplish the animation so make sure to download that before trying to compile it. This example allows you to drop an FLV file onto the player to begin playing it back. You can then click on the camera icon to spit out a screen shot onto your desktop. Then you can right-click on the screenshot in order to save it as a PNG file.

The application is actually a full maximized, transparent application rather than a bunch of native windows. This is because it is impossible to rotate native windows. It also doesn’t resize the player when a video larger than 320×240 is dropped on. Click on the image below to get the AIR file and the source FLA.

Lee

Next Page »