EVA GeoServices Video Walkthrough

Continuing the EVA blog series I’d like to introduce you to the GeoServices component for your Flash projects.  In the video I walk through the various parts of the component, including the GeoService class and how this is implemented in EVA itself.

After reviewing the code I realised that it wasn’t produced with sharing in mind, so I have created this component for you to use in your Flash Projects using Flash Professional CS5 or Flash Builder 4.

It would be great to get your feedback and thoughts for new features!

Download

Video tutorial: Create native installers in AIR 2

One of the many exciting new features in AIR 2 is the ability to create native installers. That gives your AIR 2 application the ability to talk to native code. In this video I’ll show you how to build native installers for Adobe AIR 2 using the command line, and I also explore how my [...]

Flash Player 10.1 and AIR 2 released

Aaah… This is a great day! The Flash Player and AIR teams have been working on this for months and we’ve also been talking about it for quite a while. Today we’re upgrading the web with a ton of new features in Flash Player 10.1 and enable developers to build engaging cross-platform desktop applications.
Flash Player [...]

Free Webinars: Going Multi-Screen with the Flash Platform

We’d like to invite all Flash Platform developers to a new series of webinars on June 22-24, 2010 for multi-screen web content and applications development. With the final releases of Flash Player 10.1 and AIR 2 just around the corner, our evangelists and developers who have been at the cutting edge are preparing to reveal some best practices and tips on creating unique experiences for PC and mobile users by taking advantage of the new features of Flash Player 10.1 and AIR 2. Here is a list of session topics:

Best practices in optimizing web content for Flash Player 10.1

Tuesday, June 22, 9AM – 10AM Pacific Time – REGISTER

The quickest way to build cross-platform apps with AIR 2

Tuesday, June 22, 1PM – 2PM Pacific Time – REGISTER

Rich Internet App development with Flash Builder 4 for
Flash Player 10.1 and AIR 2

Wednesday, June 23, 9AM – 10AM Pacific Time – REGISTER

Multi-screen web content development with Flash Pro CS5

Thursday, June 24 9AM – 10AM Pacific Time – REGISTER

Looking forward to seeing you there!

Package Assistant Pro

A few months ago I released an early version of my Package Assistant application. The application made it easier to compile native installers for AIR 2. While it was a lot easier to use compared to using the command line the application wasn’t very user friendly. A few weeks ago I started working on a [...]

AIR2.0 RC available on Labs

The Adobe AIR 2 Release Candidate (RC) build is now available on Adobe Labs. Please be sure to download the latest AIR runtime and, if you are an application developer, SDK. If you run into any issues, please let us know by using our feedback form to send us a bug. Please be sure to include all relevant [...]

Using NativeProcess in AIR 2 with GPSBabel

GPSBabel is one of the coolest projects on the internet. It takes basically any geolocation format and quickly lets you convert it into any other format. And the world of geodata is a wild west of various formats so it makes it super easy to bring all of that together in a handy command line tool.

Because it has a command line tool I figured it would make a pretty good (and easy) demo for AIR 2’s NativeProcess APIs. And it does! In fact, I started work on an ActionScript 3 wrapper that (should) make it easy to call GPSBabel from an AIR application and make it do your bidding. It’s in really, really rough shape, but here’s the beginning of it.

Getting Started

The first thing you need to do to use the NativeProcess API is to alter your app-xml file. After the initialWindow tag are a bunch of commented lines that talk about supportedProfiles. The NativeProcess API only works in the extendedDesktop profile so you need to enable it with this line.

<supportedProfiles>extendedDesktop</supportedProfiles>

With that, you can start testing the NativeProcess API.

Calling GPSBabel

Using the NativeProcess API is pretty simple. You first create a NativeProcessStartupInfo object which is where you point to the executable binary as well as pass in any arguments. Then you set up event listeners on the NativeProcess object, and finally you call the start() method and pass in your startup object.

To convert one file type from another, GPSBabel takes a series of command line arguments. This is the command to convert a GPX file into a KML file.

gpsbabel -i gpx -f /tmp/myroute.gpx -o kml -F /tmp/myroute.kml

So to replicate this with the NativeProcess API first create the startup object and pass in those arguments. The -i is the format of the original file, -f points to the original file, -o is the format to convert to, and -F is the converted file. All of those are pushed to the arguments property of the startup object.

var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
// The location of GPSBabel (a file object)
npsi.executable = _gpsBabelLocation;
var args:Vector.<String> = new Vector.<String>;
args.push("-i");
args.push("gpx");
args.push("-f");
args.push("/tmp/myroute.gpx");
args.push("-o");
args.push("kml");
args.push("-F");
args.push("/tmp/myroute.kml");
npsi.arguments = args;

The next step is to add event listeners to the NativeProcess object. Most of the time, GPSBabel just sends standard messages in UTF, so handling responses is easy. In the case of a conversion, the only event listener that really matters is the error listener.

_process = new NativeProcess();
_process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA,onStandardErrorData);

Dealing with NativeProcess events was a little odd to me, but because GPSBabel just returns text, this is pretty easy. If it errors, out, it dumps text to the screen. That text becomes part of the NativeProcess object. Depending on what the context is (if it’s an error, or just regular data output) it goes into a different variable. In this case, the event listener just reads the error data from the standardError property and traces it out

private function onStandardErrorData(event:ProgressEvent):void
{
trace(_process.standardError.readUTFBytes(_process.standardError.bytesAvailable));
}

The last thing to do is to go back up and start the process off by calling the start method and passing in the startup options that were created before.

_process.start(npStartupInfo);

And that’s it. I’ve got an example on GitHub as part of the GPSBabelOnAIR project. The mxml file in the examples folder uses the library which is where all of the NativeProcess code in. The combination of those should provide a working basic example of using NativeProcess and GPSBabel.

Talking breaking news application

Hi… My name is Serge and I am a news junkie… While there are a lot of breaking news services on Twitter, you can’t always leave your Twitter client running to get the latest breaking news updates (for instance at work or while presenting). In some cases you may still want to stay up to date [...]

Flash Brings the Web to Life

We just posted a few new videos to give you an update on mobile apps and the breadth of Flash content on the Web available on exciting new devices, like the upcoming Dell tablet.

Standalone Apps Outside the Browser

With dozens of tablets and new smartphones coming to market over the coming weeks and months, developers want to know how to deploy and monetize their apps across screens without having to rewrite apps for every platform and device – from smartphones, to tablets, netbooks, televisions, and others.

Today, we announced that more than 100 AIR apps, coming out of a limited pre-release program with developers, are available on Apple’s App Store. Created with Flash Pro CS5 and wrapped as native apps (via the Packager for the iPhone, a capability of AIR 2), AIR apps can be distributed to the iPhone and Apple’s tablet today, as well as Android, BlackBerry and other platforms in the coming months. Check out two videos for more details at:

Packager for iPhone Demos from Mark Doherty on Vimeo.

Browsing of Flash Content on New Mobile Devices

At the same time, Adobe and its partners believe in the free flow of content across screens and in enabling consumers to browse the full Web, including over 70% of games and 75% of video that are delivered with Flash. Check out this new video, which features different mobile devices including a sneak peak of one of Dell’s new tablets (5” tablet, not released yet) plus Dell’s 12” smartbook (Latitude Xt2) running a broad variety of Flash content.

We are excited to work with Dell to bring uncompromised Web browsing to its new devices. As previously announced, we’re also working with HP on their new line of tablets that will deliver the full Web with support for Flash Player 10.1.

Using Growl in AIR applications with AIR 2 NativeProcess

The AIR2 release is just around the corner and one of my favorite new features is the ability to use native scripts. As I’ve already demonstrated earlier, this is extremely powerful and here’s another good example.
From the moment AIR was released, a lot of developers were asking for Growl support to add toast style notifications. [...]