PhysicalFoursquare – A Flash Player 10.1 Demo App Using the Foursquare API

As you’ve seen, we’re getting close to having a version of Flash Player 10.1 that will be available to the broader public. And a lot of the evangelists have been creating some cool demos of how Flash Player 10.1 behaves on the Nexus One.

I wanted to do something slightly different and build more of a functional application.

I come from a Flex background and so I haven’t spent a lot of time creating ActionScript only projects. And while Flex performs pretty well on Flash Player 10.1, doing an AS3 only project gives it a better shot at running, especially as the application gets more complex. So I went with ActionScript only and created an application that uses the foursquare API as well as the Geonames database to find and let me check into physical features like mountains, streams, and lakes when I’m out hiking and want to still be able to check into foursquare.

Thoughts on Building for Mobile Flash

As you’ve seen, a lot of Flash content will just work. And because of the AIR for Android packager, a lot of people will just end up building applications and not worry about creating in-browser Flash apps for mobile devices. But I wanted to try it. A few thoughts:

One, the Flex mobile framework can’t come soon enough. I have so much more respect for the old-school Flashers because rolling everything by hand is a pain. And I had it easy because I was dealing with a fixed resolution since I was specifically targeting the Nexus One.

Two, while I didn’t do much in the way of performance tuning, that’s going to be important. These are pretty beefy devices and we’ve done some great optimizations, but for complex Flash content, tuning your code will be central to a good experience.

Three, as Mike Chambers showed, hover content works, but I found it kind of annoying. The way it’s currently set up, the hover event fires after the down event fires. So using SimpleButton the way I normally use it didn’t quite work because the effect was off. I ended up just making the hover state the same as the down state.

Lastly, I was surprised how much just worked. I pulled a LOT of third party content into this application. Keith Peter’s Minimalcomps, the foursquare AS3 API by Tim Walling, my own AS3 library for Geonames, the Google Maps API, TweenLite, Shannon Hicks’ OAuthAS3 library – and it all worked just fine. Part of what I wanted to test was how much I could throw at the device and I was pleasantly surprised by how well it all worked even on the beta bits of Flash Player 10.1. So when you target these devices, you’ll be able to use a very similar workflow, which I think is important.

To see the application in action, you can check out the video above or test the application in your browser here. You’ll need to have a browser like Firefox 3.6 that supports geolocation and if you check in you’ll be checking in this poor guy. All of the code is available on GitHub and you’re free to do with it what you will. Unfortunately my OAuth implementation was half-assed, so the foursquare checkin didn’t work, but it works in the browser.

AIR 2 Multitouch Gestures and the 3D Google Maps Flash API

I took some time over the weekend to dive into the multitouch APIs on AIR 2 and built a basic example with the Google Maps 3D API. I wired up the out of the box gestures in AIR 2 to some specific manipulations so that it goes beyond the typical move and pinch gestures that most of the multitouch mapping apps use. You can see the YouTube clip below and grab the source over on GitHub to see how easy it is to use the gesture events in AIR 2.

A couple of great places to look for more multitouch info is Christian Cantrell’s blog and Matt Legrand’s Multitouchup.com. I’m also working on an Android version of the app but there are a couple of kinks to work out.

MAX 2010 Call for Speakers Open Until May 3

MAX is always one of my favorite shows of the year. It was my first big show as a community member and as an employee it’s become a great gathering of the community as well as a fun way to show off what’s coming. This year, I’m going to be a lot more involved because I’m taking part of the reigns from Ted and running the content side of things. Because of that, I want to make sure we have the most kick ass sessions and speakers as possible from the community.

Last year we did a call for topics but it got a little bit difficult to manage because there were some topics that the community submitted that overlapped with what the engineers where planning to talk about and there were some things the community didn’t know about and couldn’t submit for. So this year we’re doing a call for speakers instead. The idea is that instead of picking people based on topics, we’ll pick them largely based on their speaking chops, and then either use the session they mentioned or work with them to put them into a session that they are excited about giving.

The call for speakers is open until May 3 so if you’re interested in speaking at MAX, please go fill out the form. And if you have any questions, drop me an email ryan@adobe.com.

ActionScript/Flash/Flex Library for Geonames

I’m working on a mobile application demo that relies heavily on the Geonames service and in the process started work on an ActionScript library for accessing the web service that you can find on Github. If you aren’t familiar with Geonames it’s a fantastic project. It’s a database of placenames from all over the world (over 8 million) and each has a bunch of data (including latitude and longitude) about it. The database includes everything from physical features like mountains to schools and parks in cities. And it’s all free.

The API is really basic right now and it only implements the findNearby method but hopefully it’s a start. And I want to round it out as I start to use it for more demos. It’s a really amazing amount of data.

The Littlest Flex Developer

My blog has been pretty dusty the past couple of weeks even though there is a lot going on in the Adobe world. Normally I try to stay away from the purely personal stuff so I humbly beg your forgiveness for this detour into Ryan’s life. I’ve been very preoccupied for the past week because on March 27th, my wife and I welcomed our daughter into the world. It’s our first and we’re having a blast getting to know her. I’m on paternity leave for another week so while I’m keeping up on what’s happening with Apple’s tablet, Flash Player 10.1, and Adobe AIR on devices, I can honestly say (maybe for the first time ever) that it’s not occupying much of my time.

I’ll indulge one small parental moment and share a couple of pictures of our daughter, Juniper Olivia Stewart. And I’ll be back to blogging next week. But probably a bit more sleep deprived and (even) less coherent than usual.