Kinect + Stage3D + Away3D + AIR = pure gold!
Check. This. Out!
Wouter Verweirder (lector at HOWEST in Kortrijk, Belgium, Adobe Education Leader and wizard owner of/consultant at Happy Banana) recently released an extension for AIR that allows you to use Microsoft’s Kinect sensordata in your AIR applications. To showcase the power of this he just released this video where he’s actually controlling a 3D model (rendered with Away3D on Stage3D in AIR) with his own movements. Pure gold! Can you imagine the possibilities?
New on Adobe Labs: Flash Player 11 beta 2 and AIR 3 beta 2
New toys goooood ;-)
If you’re anything like me you’ve probably already downloaded the new Flash Player 11 and AIR 3 betas from Labs. If not… Do so now! I know I’ve said this many times before but I’ll repeat it again: We release these betas so that you can test your existing content and start playing around with the new features early. If you encounter anything weird or out of the ordinary then do let us know!
Right… My favorite new features…
For Flash Player 11 it has to be Stage3D (the API previously know as Molehill). 3D on the web is nothing new but when all of a sudden (just about) every web user has 3D capabilities it becomes a whole different ball game. I’m really looking forward to see what you guys build with it. Some of the early demos are absolutely mind-blowing. Another great feature in Flash Player 11 (and an easy one to miss) is native JSON support! (Both features are also available in AIR 3. Stage3D currently only available for desktop. Stage3D for mobile will be enabled in a future release.)
AIR 3 beta 2 is also a really exciting beta release! My favorite feature for AIR 3 is definitely the ability to add the AIR runtime to your installer package. So with AIR 3 you can control exactly which version of the runtime an app executes against and make the installation process a lot easier as well. Hardware accelerated video (aka StageVideo) on mobile is also a big one. And let’s not forget the addition of the encrypted local storage feature on mobile.
Both betas are available on Labs. Flash on!
AIR 2.7 now available for desktop, Android, iOS and Blackberry Tablet OS.
When I think about the new features in AIR 2.7 I can’t help but think about this Daft Punk song… Harder, Better, Faster, Stronger. That’s exactly what this release is all about… Well… You know what I mean ;-)
On mobile my favorite new feature is the improved rendering on iOS. With this release AIR apps for iOS render up to 4x faster in CPU mode. This change will improve the performance of many AIR for iOS apps, including those built with the Flex framework.
But don’t believe our words for it… Try it out yourself! There are already some really cool AIR apps in the appstore today. Try the Rossignol app for instance.
Or try one of Terry Paton’s games like Meteor Storm or Mazeball!
Another one of my favorite new features is probably the most requested feature for AIR for Android. You can now install or move the AIR runtime onto the SD cards within your Android devices!
An update for Flash Builder will be released soon but you can already grab the AIR SDK today and start building your apps!
Displaying ads in your mobile AIR application
I’ve seen a few Tweets from people who were asking about adding ads to their mobile AIR applications… Well… There’s actually a hidden gem in the AIR documentation… But… As most of you probably never read any docs ;-) I thought I’d highlight it here.
The trick is simple… Use the StageWebView class. You set the StageWebView object viewport to cover the area in your application in which you want to display the ad. Then you load an HTML page that contains the code for requesting and displaying ads. And tadaaaa… You have ads in your mobile AIR application.
Here’s an example of an HTML page that loads an ad from AdMob.
<html>
<head>
<title>Ad jig</title>
<script type="text/javascript">
var admob_vars = {
pubid: 'admob_pubID', // change to your publisher id
bgcolor: 'ffffff', // background color (hex)
text: '000000', // font-color (hex)
test: true, // test mode, set to false if non-test mode
manual_mode: true
};
function showAd()
{
_admob.fetchAd(document.getElementById('adspace'));
}
</script>
<script type="text/javascript" src="http://mm.admob.com/static/iphone/iadmob.js"></script>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body onload="showAd()">
<div id="adspace"></div>
</body>
</html>
The following ActionScript code will display the ad page in your mobile AIR application.
//Set up web view object
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
var adViewPort = new Rectangle( 0, 0, this.stage.stageWidth, 60 );
webView.viewPort = adViewPort;
webView.addEventListener(ErrorEvent.ERROR, onWebViewError );
webView.addEventListener(LocationChangeEvent.LOCATION_CHANGING, onWebViewLocChanging );
webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, onWebViewLocChange );
//Copy the html file outside the app directory
var templateFile:File = File.applicationDirectory.resolvePath( "adview.html" );
var workingFile:File = File.createTempFile();
templateFile.copyTo( workingFile, true );
try
{
webView.loadURL( workingFile.url );
}
catch (e:Error)
{
trace( e );
}
function onWebViewLocChange( event:LocationChangeEvent ):void
{
trace( "Change to" + event.location );
if( event.location != workingFile.url )
{
//Reset location back to our ad display page
navigateToURL( new URLRequest( event.location ) );
try
{
webView.loadURL( workingFile.url );
}
catch (e:Error)
{
trace( e );
}
}
}
function onWebViewLocChanging( event:LocationChangeEvent ):void
{
trace( "Changing " + event.location );
event.preventDefault();
navigateToURL( new URLRequest( event.location ) );
}
function onWebViewError( error:ErrorEvent ):void
{
trace( error );
}
But what if you want to use the mobile Flex framework? Well… Sönke Rohde actually wrote a wrapper around the StageWebView class so you can use it as a Flex component. By using this wrapper it becomes as easy as adding this one line of code to your app.
<components:WebView source="adview.html" width="300" height="50"/>
Note: This approach will most likely also work with other ad networks. Also not that this only works on mobile AIR applications. The example does not work in desktop applications, or when testing mobile applications on the desktop, due to local-versus-remote sandbox restrictions.
Kudos to Adobe’s learning resources team for putting this example together and to Sönke for creating the StageWebView UIComponent.
Now go make some money ;-)
AIR 2.7 + Flash Player 10.3 Beta 2 on Labs
The runtime teams are on a roll! Flash Player 10.2 was only released to the general public just last month and the first beta of Flash Player 10.3 was already on Adobe Labs just a few weeks after that. Today the second beta of Flash Player 10.3 is available on Labs.
Flash Player 10.3 introduces new developer features and enhanced user privacy protection, such as:
- Media measurement
- Acoustic echo cancellation
- Integration with browser privacy control for local storage
- Native control panel
- Auto-update notification for Mac OS
We’ve also just released AIR 2.7 on Labs. AIR 2.7 also has the media measurement and acoustic echo cancellation features from Flash Player 10.3 as well as an enhanced HTMLLoader API.
These new beta runtimes are available so that you can test your existing content and start playing around with the new APIs. If you find an issue make sure you tell us about it!
Digital magazines coming to Android built on AIR
I’m sure you’ve heard about the Wired, Martha Stewart, and New Yorker magazines on iPad, right? Those were created with a new suite of tools that we’ve been working on. The Digital Publishing Suite allows you to use your existing staff, skills, and Creative Suite publishing tools to design and deliver publisher-branded reading experiences to mobile devices.
Currently these magazines were only available on iOS devices but this week at MWC we announced that the Android viewer is now available. The application is actually built on AIR!
Condé Nast, publisher of WIRED magazine, showed off the magazine at MWC on the Motorola Xoom running Honeycomb. Check out the video below for more info (courtesy Seattle Times):






