Building iPad Applications with Flash

Today Apple announced the Apple iPad and like many of you, we at Adobe are looking forward to getting our hands on one of these devices. This is an exciting time to be a software designer with an explosion of new devices and we look forward to helping Flash developers and designers bring innovative applications to these devices using our tools and frameworks.

We announced the Packager for iPhone at MAX 2009 which will allow Flash developers to create native iPhone applications and will be available in the upcoming version of Flash Pro CS5. This technology enables developers to create applications for the iPhone, iPod touch, and iPad (though applications will not initially take direct advantage of iPad’s new screen resolution). It is our intent to make it possible for Flash developers to build applications that can take advantage of the increased screen size and resolution of the iPad.

Flash developers are used to being able to create rich expressive content that run well across multiple screens. The Flash Platform already provides developers with the ability to create applications without making assumptions about screen resolution and pixel density. Our very own Christian Cantrell has posted an in-depth article on the Adobe Developer Connection, Authoring For Multiple Screen Sizes, that details best practices in creating applications that run on multiple screens. If you want to prepare applications today that will work great on the iPhone, iPod touch, and iPad, follow the guidelines from this article today.

While we put the finishing touches on the Packager for iPhone, we have invited a few developers and designers to join a closed pre-release program. As they are testing it and giving us feedback, they also have been able to use it to build some applications that they have submitted to the iTunes App Store. Here are some recent iPhone applications that you can find in the App Store now:

GoldStrike_small.pngGold Strike
This popular action/puzzle game has been around for nearly a decade and played by millions. You are a miner who has struck gold! But the mine is unstable. Remove gold by finding groups of blocks as tremors fill the mine up.

Brush_small.png


Brush
Dr. Alan Acierno has created a Brush application which times every tooth and section of the mouth to help you brush 3 minutes twice a day

To follow news from the Flash Platform Team about the iPhone Packager and other new developments, follow us at @Flash_Platform

Update:
As a result of Apple’s updated legal terms (section 3.3.1 of the Apple iPhone SDK License Agreement), Apple is no longer permitting these applications to be delivered to iPhone, iPad and iPod touch users through the Apple App Store. This a legal restriction imposed by Apple and is not a technical limitation of Adobe AIR or Adobe Flash Professional CS5.

At this time, we have ceased further development of the Packager for iPhone, and we plan to keep this completed work in CS5 to demonstrate the capabilities of the Flash Platform to support multiple platforms and devices. We have already started the pre-release of AIR for Android and will shift our investment there and to other technologies, in addition to the work we have already been doing on Flash Player 10.1 for Android. We believe Android will enable a series of very competitive devices in the market and are working closely with Google and other Open Screen Project (OSP) partners on this.

Providing alternative videos for iPhone

Let me state up front that this post is not meant to try to start a debate of the topic of Flash video, HTML 5, and the iPhone. I will post my thoughts on HTML 5 video in another post. The objective of this post is simply to show how easily you can provide an iPhone alternative to your Flash video content.

After getting back from Brasil, I started a new personal blog called Essa Porra. In one of the posts I showed a video of some of the beach jiu-jitsu that broke out down there. I used Vimeo to host the video. Now they recently announced a beta HTML 5 player but it doesn’t work for embedded videos so I decided to provide my own iPhone alternative. The actual steps are quite simple.

First you will most likely need to encode a version that will play nice on the iPhone. I used Handbrake to create it by choosing the iPhone/iPod preset. Now you also have to check off the Web optimized option if you want it to progressively stream. The next step is to get a photo from the video to show if the user is coming from the iPhone. It should have some type of icon showing that it is playable. I chose a simple white triangle. You can see the final result on the iPhone below.

Now you need to provide a little bit of JavaScript logic to check for the iPhone browser and change the content of the page. I took the Vimeo embed code and wrapped it in a div with an id of jj. In the JS code I remove the embed code if the user is coming from an iPhone and replace it with the image. The image is hyperlinked directly to the video file I encoded using Handbrake. This will make the video play in the standalone video player on the iPhone.

1
2
3
4
5
6
7
8
9
<script type="text/javascript" language="javascript">
<!–
if((navigator.userAgent.match(/iPhone/i)) ||
   (navigator.userAgent.match(/iPod/i)))
{
     document.getElementById("jj").innerHTML = "<a href=\"VIDEO_URL\"><img src=\"/images/jj.jpg\" /></a>";
}
–>
</script>
That’s all there is to it. Kind of a pain but it is nice to provide this experience if you think a lot of your visitors will be coming from the iPhone. Check out the post from an iPhone to see it in action.

Lee

FITC Amsterdam : Building High Performance iPhone Applications with ActionScript 3

Sorry for the two month hiatus on posting. I was on a sabbatical and vacation from work for the last 6 weeks of 2009, and have spent the first couple of weeks of 2010 busy working on code, and preparing some events for the spring (more on that in another post).
Some of the stuff […]

Have you looked at Tour de Flex lately?

If you haven’t looked at Tour de Flex in the past few weeks, go check it out. We’ve added some cool new content in the last few weeks:

Flex 4 Preview samples by Holly Schinsky
AIR 2.0 / Flash Player 10.1 samples by Holly Schinsky
Data Visualization Samples by See4th Design
YouTube API samples by Holly Schinsky
Chris Callendar’s […]

ColdFusion 9 Free Workshop in Prague on February 23

My good friend and Adobe ColdFusion specialist Claude Englebert will be leading ColdFusion 9 workshop in Prague on February 23 2010 afternoon. I will join Claude and show some Flex 4/CF9 stuff. We have limited number of seats so feel free to register now and get your place.
Location: Adobe Office Prague, Radlická 714/113a, Praha […]