Oct
31

Actionscript to Objective-C and Starlight Sunil

iPhone

I’ve been meaning to try my hand at iPhone development for quite some time, but as is usually the case, finding time to tinker between client gigs and random personal projects can be difficult. I’m a little late to the game, but I am excited to get my first demos onto my phone. This initial post will hopefully mark the beginning of a series of posts on iPhone development from the perspective of an intermediate Flash developer.

Some big announcements were made at the Adobe Max 2009 conference, one of which will be the ability to publish native iPhone executables with CS5. I’ve been debating if it’s worth the trouble of learning Objective-C, when Adobe is saying we should expect a public Beta of CS5 before the end of the year.

I wonder how successful iPhone development with CS5 will be. This is a funny tweet from @BIT101 on the subject of iPhone/Flash development:

Want to know how experienced iPhone devs view Flash CS5 -> iPhone? pretty much like experienced Flash devs view this: http://bit.ly/16zwUI

There are some missing features that will prevent you from using the following on the iPhone:

There are some missing features that will prevent you from using the following on the iPhone:

  • Photo selection from file system
  • Contact selection from the address book
  • Camera
  • Cut/copy/paste
  • Accessory support
  • In app purchase support
  • Peer to peer
  • Maps
  • iPod library access
  • Compass
  • Push notifications
  • Audio recording
  • Video recording
  • Parental Controls

Also the following will also not be available from the Flash side:

  • Embedded html content
  • RTMPE (this was our call)
  • H.264 Video (you can use URLRequest)
  • Dynamically loading SWFs (containing AS3 code)
  • PixelBender

source

Here’s a FAQ from Adobe for developing iPhone apps with CS5.

There are a few resources I’ve looked into order to ramp up my knowledge of Objective-C and iPhone development:

Beginning iPhone 3 Development: Exploring the iPhone SDK by Dave March and Jeff LaMarche seems to be a very popular reference book for those new to iPhone development:

http://www.apress.com/book/view/1430224592

Julian Dolce has posted slides and sample code from his iPhone workshop for Flash Developers at FOTB ’09:

http://deleteaso.com/iphone-workshop/

iPhone Tech Talk World Tour. This is a day long meeting for iPhone developers, where evangelists will be presenting ways to maximize the features of the iPhone OS. The tour lands in Toronto on December 3rd.

http://developer.apple.com/events/iphone/techtalks/

The official Apple way of deploying iPhone apps to your iPhone or iPod touch:

http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices

While the prospect of learning the syntax of a new programming language is daunting (I hear Objective-C is a bit intense from even seasoned developers), I’m looking forward to the challenge of building my first simple app by porting an old app of mine called Starlight to the iPhone.

What is Starlight?

Starlight is a prototype app I built in Spring 2008 using Flash Lite. Using the free QR code reader from Kaywa (http://reader.kaywa.com/), you can download and run the swf app on your Nokia phone. The purpose of the application was to promote the ONE campaign and encourage fan participation during U2’s Vertigo tour. The functionality of the app is most comparable to flip card stunts that occur at college football games, turning stadium spectators into participants, and allowing them to be part of the show.

Budlight Example

At arena concerts, holding up a lighter during slow/acoustic songs has been replaced by glowing cell phone displays. How about turning sea of random white lcd displays from phones into something more meaningful like simple text or even better synchronized animation?

Originally I was using a QR code on the back of a ticket stub to determine a user’s location in an arena or stadium. Although big in Japan, QR Codes don’t seem to be as popular in North America.

Use your QR code reader to download app directly to your phone (phone must be Flash Lite capable!):

qrcode

Direct link to Starlight prototype

I had left Starlight on the back burner, until Blackberry released a teaser for the U2 mobile album designed to coincide with the kickoff of U2′s 360 tour. Most of the features of this app are fairly straightforward like album info, tour information and photo galleries. What caught my attention were the interactive features that have yet to be released like, viewing geotagged photos from other fans, chatting live with friends at shows and seeing who’s listening to the album across the globe.

The concert view UI for chatting with other fans in the teaser is similar to the Starlight UI, although the functionality of both is different (at least it seems that way).

starlightbbcomparison_lbj

Setting the phone’s screen colour based on GPS location and even connecting to a media server to coordinate complex animations with multiple phones doesn’t seem like it would be too difficult to program.

Here’s a pitch video I’ve spliced together from several sources (video – starlight, bb teaser, u2 360 tour LA, u2 360 tour Toronto, Visa Go commercial, audio – U2 Vertigo Toronto) to illustrate the functionality of Starlight.

Another example of real world particle effects that I imagine would be a similar to stadium visualizations produced by Starlight: ELECTRABEL

As 360 the tour has wrapped up its second leg, I hope the remaining features of the U2 mobile app are released before the band returns to Toronto and Montreal for encore performances in July 2010. I attended the concerts on Sept 16th and 17th in Toronto (also the same nights the U2 mobile app launched) and when the lights dimmed in the stadium, it was neat to see thousands of Blackberries raised in the air. You could tell they were Blackberries because they all recording video and had the same blinking red LED at the top right hand corner of the devices. I think there may have been a disproportionate amount of blackberries in the stadium due to the number of RIM employees that had gotten free tickets to see the show.

U2′s recent Youtube streamed Rose Bowl concert, attracted over 10 million streams from over 188 nations. Despite the large viewership and breaking all kinds of records, they have be criticized for not using social media to it’s full potential. Before the concert aired on Youtube, there was 30 minutes of dead air used for testing. This dead air could have been used to promote the ONE campaign or any number of the band’s causes. A mobile app that incorporates fans into concert coverage would go along way to in showcasing the shared experience of viewers in North America, South America, Europe, Africa, Asia, Australia, and Antarctica. U2 fan or not, it’s important to recognize the possibilities that exist with mobile applications.

For my initial Starlight prototype I will start out simple. I plan to access the phone’s microphone, and will using screen colour to visualize microphone activity level. In theory, the closer spectators are to a stage, the brighter their screens would be, as they will be closer to the band/speakers.

Stephen Celis has made a singleton class to access the iPhone microphone which just a few lines of code.

This entry was posted on Saturday, October 31st, 2009 at 9:44 am and is filed under iPhone. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.