Flash CS5 and The Magic IPhone Packager

Today was my first day working with Flash CS5 and I loved it. Adobe finally added code completion and auto-import for the custom classes to the ActionScript editor. The code completion works for functions, events, properties and everything in between. Another cool improvement is the compiler error panel. You can now make more sense of the messages and switch between errors and warning. All and all, these changes significantly improve productivity and streamline the development process. Now to the big stuff.

It is true, you can compile Flash applications for the IPhone and it really works.

It works and it is quite simple. Adobe added libraries to handle location, accelerometer, multi-touch and other phone-specific features. To give you an idea here is how to capture GPS coodrinates of your device:

import flash.events.GeolocationEvent;
import flash.sensors.Geolocation;
 
var location:Geolocation = new Geolocation();
location.setRequestedUpdateInterval(1000);
location.addEventListener(GeolocationEvent.UPDATE, onLocationDataReceived);
 
function onLocationDataReceived(event:GeolocationEvent):void
{
// Here is your location data
trace(event.latitude);
trace(event.longitude);
}

To sum things up, I had a very good first impression, now is the time to test thing with a fully-featured location app.