Posted on

Sexy looking Ext Js Window in a transparent chromeless Adobe AIR application

This is something I’ve been trying to get working for ages but had thought it was impossible.  I’ve seen several ext+air examples using custom chromes, but they all used standard square looking viewports (SimpleTasks2ExtPlayer).  They look nice, but I think with Ext & AIR we have the potential for a bit more ‘wow’ factor. Continue reading Sexy looking Ext Js Window in a transparent chromeless Adobe AIR application

Posted on

Google Adsense in Adobe AIR

Just thought I’d make mention of the fact that I’m currently working on a little AIR based app to pull down a user’s usage stats from iiNet and display them in sexy looking progress bars and charts. One thing that piqued my curiosity is weather or not Google Adsense ads could be added to the app to generate a bit of revenue.

After a bit of experimenting I found that the code won’t run at all from the standard application sandbox, but will run perfectly in the non-application sandbox, provided you specify a valid url as the sandboxRoot.

So in your main app window you add an iframe to a non-application sandbox based url:

<iframe id=”adsense” src=”adsense.html” sandboxRoot=”http://www.eltomtom.com/” documentRoot=”app:/” frameborder=”0″></iframe>

Then in your adsense.html file simply embed the adsense code as normal:

<script type=”text/javascript”>

/** google adsense code */
google_ad_client = “XXXXX”;
/* 20090312 AIR Banneer Black */
google_ad_slot = “XXXXX”;
google_ad_width = 728;
google_ad_height = 90;

</script>
<script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”></script>

After getting the code to work of course the next step is to check views and click throughs are actually being counted, as google could have been doing some form of user agent filtering, but sure enough clicks and views are counted fine. When you click on the ads the html page actually pops up in a new chromed AIR window, which I thought was a nice touch.

The one caveat I’ve found is that you can’t use the rounded corners of the adsense code, which throws errors in AIR.

Anyway I think combining the ease of development of AIR based applications, coupled with Google Adsense, makes for a very appealing revenue model for application development, and one I’m keen to explore further over the coming months.  Stay tuned!