first air app [update: 7 July 2009]

first air app [update: 7 July 2009]

My first ever Abobe AIR app is an blog reader for my blog.

This app basically developed with just HTML and Javascript. I also developed a server side API on my blog so that the AIR app can get the latest news. It also indicates that this app require an internet connection, or else it is just a crap.

The most difficult part is linkage between AIR app and server side. Theoretically, JQuery can be use to get data of my blog. But JQuery meanwhile does not support cross domain XML. This can be solved by using JSONP.

   1: $.ajax({
   2: url: http://www.otherdomain.com/example.php,
   3: type: jsonp,
   4: jsonp: jasonp_callback,
   5: success: function(jsonp){
   6:
   7: //ur method
   8:
   9:     }
  10: });

I did retrieved data from my blog onto my localhost, but contained so much error syntax that i couldn’t understand.

Then I use the hard way, using air component.(I mentioned “hard” is just because I never learn AIR thoroughly)

The result is just like what I want. Then the rest is just like normal HTML+JavaScript. I used JQuery to process the XML returned from my blog.

Screenshot:

v1

image

v1.01

image

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

log:

  • 6 July 2009: yaofongblog preview build 1: Load 10 latest blog post of http://blog.yaofong.com
  • 7 July 2009: version 1.01(build 2): Revamped with new interface

About the Author

IT developer. Develop for php, asp, javascript, html, css, ajax, google map api, facebook platform, flash, flex, air, c, java and many more to come. Currently working in Syntax10.