ezSTT is a native extension that provides voice recognition to mobile applications on iOS and Android. The extension primarily relies on online services provided by Google and Apple to perform the recognition process, which requires a connection to the internet. If the ANE is used offline, the appropriate language packs must be installed in the system (there is no way to do this programmatically).On both systems, this ANE

On iOS and Android, the extension supports the following languages: English, French, Italian, Spanish, Deutsch, Chinese, Japanese, Russian, Korean, Portuguese, Czech, Dutch, Polish, Swedish, Turkish. Those are the exact same languages provided in AIR 24 runtime.


import com.fabricemontfort.air.ezstt.STTEvent;
import com.fabricemontfort.air.ezstt.languages;
var stt:ezSTT = ezSTT.instance();
public function onAuth(event:STTEvent):void
    trace (event.message);
    if (stt.isAuthorized()) {
        stt.removeEventListener(STTEvent.AUTH, onAuth);
        stt.addEventListener(STTEvent.FINAL, onFinal);
public function onFinal(event:STTEvent):void {
    // Best result from Google / Apple
    stt.removeEventListener(STTEvent.FINAL, onFinal);
    trace (event.message);
if (stt.isSupported()) {
    if (stt.isAuthorized()) {
        stt.debug = true;
        stt.addEventListener(STTEvent.FINAL, onFinal);
    } else {
        stt.addEventListener(STTEvent.AUTH, onAuth);
Comments Off on ezSTT


ezSpeech is a native extension that provides voice to mobile applications on iOS and Android. The extension does not use online services, instead it works offline using the TTS engine (text to speech) of the device. The API allows developers to customize the output audio, adjusting elements as speed and language.

Regarding the language selection, on Android, if a specific TTS voice file is not installed and internet connection is available, the ANE will download and install it automatically. On iOS, all voices supported by the extension are pre-installed.


import com.fabricemontfort.air.ezSpeech;
import com.fabricemontfort.air.ezspeech.languages;
var tts:ezSpeech = ezSpeech.instance;
if (tts.isSupported()) {
    tts.say("Hello. This is a sample application!");
    tts.say("Bonjour. Ceci est un example d'application!");
Comments Off on ezSpeech

Firebase Core

Firebase is a native extension that gives access to the Google Firebase project in Adobe Air projects supported on both Android and iOS with 100% identical ActionScript API. The extension will cut down the amount of time you would spend on setting up server-side logics and besides that, it ensures that your content will always be available to your users as fast as possible.

Below are the main highlights of this native extension:

  • Enable the Firebase Core in your AIR apps
  • Enable the access to all of the Firebase child ANEs’ features:
  • Automatically gets connected to the Admob ANE to show detailed analytics.
  • 100% identical AS3 API
Comments Off on Firebase Core

Touch scroller

Touch scroller allows anything in your (mobile) app to become scrollable. The library is CPU friendly, allows switch between Touch scrolling and desktop scrolling, has full interaction with the status of your content, uses Greensock BlitMask tech for max performance on mobile devices, has the ability to externally scroll content, for Anchor purposes, HoldArea option in Touch scrolling for easier interaction with the content, sticky scrolling option (just like Android 3.2+ scrolling and iPhone like scrolling) and lots of more detailed options and attentions.

Comments Off on Touch scroller


Admob is a native extension that provides access to Admob on Android and iOS with 100% identical ActionScript API and an easy interface. It supports banner and interstitial ads, provides control over all required EventListeners, makes it possible to position the Ads by pixels and features a 100% identical AS3 API for Android and iOS.

1 Comment

Codebot devlog 005 – built-in audio tools

This post is part of a series describing the development of Codebot, an open-source IDE focused on game development. Check out the other posts of the series here.

I’ve made some good progress on Codebot over the last few months. I tried to implement as many planned features as possible, but sometimes the codebase was not that smooth to allow quick iterations. As a consequence, I had to stop, take a look at the big picture and re-factor some (major) pieces here and there.

Eventually I managed to keep the foundation solid enough to advance on implementing my original ideas for Codebot. When developing a game, I tend to spend a significant amount of time tweaking small things, like images, tilemaps, converting sound files, finding assets/SFX, etc. I want Codebot to help me with that so I started working on the built-in tools that will make it possible. For the sake of motivation, I started with audio tools which include a sliding panel to generate SFX and a very simple audio editor.

For the SFX generator, I used jsfxr, a javascript port of the famous sfxr. After a few hours of work, I had a sliding panel with jsfxr “caged” within:

Codebot with jsfxr

While working on the panel, I noticed how hard it was to organize and style content, so I re-worked almost from scratch the way panels handle content. I think it is much better now. As a bonus, I developed a set of nice dark UI components to use throughout Codebot. I might even spin this part off  as a standalone lib. Here is the same SFX generator panel, now more polished and based on the new dark UI:

Codebot Sound Central

In order to generate a SFX for a project, the user just needs to open the sliding panel, click a generator (e.g. explosion), tweak it if needed, then finally add the file to the project. It’s a simple, quick and painless process. I am really happy having something like that available at a distance of a click during the development of a game. Take a look at this GIF showing the whole process of adding an auto-generated explosion SFX to a project:

Codebot sound central sliding panel

After implementing that, I started working on a simple audio editor. This editor will be displayed when the user double-clicks any audio file within the IDE. For now the editor is only able to play the file, but it will be able cut pieces of the sound (useful for removing silence, for instance). It will also have conversion features, e.g. converting from wav to mp3 formats. The audio editor is in early days of development, so it is not pretty at all, but it’s a start:

Codebot cuilt-in sound editor

I already started the search for a few more libs to implement the built-in graphic tools, but that’s a topic for another post. Things are taking shape and will be decent and usable in the near future. Stay tuned!

codebot gamedev IDE sfx

Codebot devlog 004 – moving to the cloud

This post is part of a series describing the development of Codebot, an open-source IDE focused on game development. Check out the other posts of the series here.

After a break of a few months, I finally resumed Codebot development. When I started working on this project, my motivation was the lack of open-source editors that could be easily modified to my needs and run on a variety of platforms. The closest option I had back then was Brackets, an editor backed by Adobe built on top of web technologies.

I am not going to say I was working to create a better Brackets, but I wanted to try a few ideas of my own. Things changed when Github launched Atom, a hackable editor also built on top of web technologies. Two editors based on similar web technologies indicated that using web stuff to develop an IDE was not a bad idea after all. I had chosen the right foundation for Codebot, which is also based on those technologies. After Atom, continue to work on Codebot as a standalone IDE became pointless.

The reason is quite simple:

Atom commit log

Both Atom and Brackets are strong projects with vibrant communities. They evolve very quickly and their development pace is something I will never be able to follow. As a consequence, I decided to focus on developing Codebot as an IDE that runs on the cloud. It might not evolve as quickly as the other code editors do, but I certainly can add some nice back-end features that still make it a useful tool.

I will stick with my ideas of gamedev sliding panels, but they will be web-based now. Codebot will evolve to become the help you need when you don’t have your regular development machine at hand, for instance. Since I’ve decided to make Codebot run on the cloud, I’ve been working on making it available online. I have a functioning and relatively stable version up and running, but it’s too early to ask for feedback from users.

Here are a few images to show it is all true, otherwise what I said never happened :) First the Codebot website:

Codebot website

And here is its login screen (with Github authentication):

Codebot login screen

I am polishing a few rough edges now, but soon Codebot will be open for Alpha testers. I plan to support two toolchains during the Alpha period: Flash and HTML5. I will talk about them later in a future post.

codebot gamedev IDE


GooglePlus-ANE is a native extension to use Google+ sharing capabilities. It is available for Android and iOS and allows developers to share content to Google+ directly from withing the application. The API can be used to authenticate (sign-in and sign-out) a user and share content, as well as check all those procedures using event.

On iOS, however, there isn’t a login screen, so users are redirected to the Google+ app. If it is not installed, the Google+ website will be displayed via Safari. Once the login is completed, the user is redirected back to the application. After that users won’t leave anymore your application. On Android, the users don’t have to leave the application to share content.


var _googlePlus:GooglePlus;

_googlePlus = new GooglePlus();
_googlePlus.addEventListener(GooglePlusEvent.LOGIN_FAILED, _loginFailed);
_googlePlus.addEventListener(GooglePlusEvent.LOGIN_SUCCESSED, _loginSuccessed);
_googlePlus.addEventListener(GooglePlusEvent.POST_NOT_SHARED, _postNotShared);
_googlePlus.addEventListener(GooglePlusEvent.POST_SHARED, _postShared);
_googlePlus.addEventListener(GooglePlusEvent.DISCONNECTED, _disconnected);

// Login
if (!_googlePlus.isAuthenticated()) {
} else {

// Share
if (_googlePlus.isAuthenticated()) {
	_googlePlus.share("Text title", "http://my/url", new _logoBitmap().bitmapData);

Comments Off on GooglePlus


as3-to-typescript is a tool that helps porting as3 codebase to typescript. Written in typescript itself, the tool runs on top of NodeJS, working from the command line. It will not transform an entire codebase into perfect typescript, doing the required adjustments that just a programmer could do.

The tool’s goal is to transform the sources into syntactically correct typescript. It will not try to provide javascript implementation for flash libraries either. Besides those limitations, the tool is based on an actual actionscript parser, so it should be able to handle most of as3 constructs and greatly ease the pain of porting a large code base written in as3 to typescript.


as3-to-typescript /path/to/source_dir path/to/output_dir 


AS3Unit is a unit testing framework. It was designed to make the testing process easier and straightforward, differently from other frameworks that require a significant amount of setting up and reconfiguring.

In order to use the framework, all tests must be placed in a convenient folder structure. Every class in folder will be run as test cases, but only methods starting with ‘test’ will be run. The available assert methods are like those in any other unit testing framework. ex: assert, assertFalse, assertEquals, assertSame, assertNotEquals, assertNotSame. There are fail helper methods as well: setUp, tearDown, setUpClass, tearDownClass.


import com.hoten.as3unit.TestCase;

public class TestAsserts extends TestCase {
	public function testCanary():void {

	public function thisIsNotATest():void {
		fail("Expected only methods starting with 'test' to run!");

	public function testAssertEqualsOneAndOnePasses():void {
		assertEquals(1, 1);
Apache 2.0


AR ANE is a native extension that provides augmented reality capabilities to applications on Android and iOS. It allows the application to open the device camera and detect targets using native code to handle all the processing. The extension will dispatch what it has found, so the developer is able to react to that information in the intended way.

Currently the extension is able to detect a planar region using the camera. The information related to that planar region, such as angulation and position, can be used to play a video within that identified area, for instance.


20% off the DiaDraw Camera ANE

If you need a native extension to access the device’s camera on Android and iOS, I have a deal for you. Buy DiaDraw Camera ANE until the end of this year using coupon code as3gamegearsrocks at check-out and save 20%!

If you buy the extension, you will also get a free copy of their best selling eBook Easy Native Extensions. Thank you DiaDraw for such a nice discount to all As3GameGears readers!




Crater is a fast physics simulation for handling large quantities of solid rectangular crates. It was developed primarily to be the base for grid based physics games such as platformer-games. Despite of being a physics simulation library, it does not perform any calculation regarding separation, so objects will collide but remain still after they touch each other.

The library is useful to create any game that does not rely on separation, such as a tetris clone. Its feature set is not as complex as similar physics simulation libraries, such as Nape.


var sim:Simulation;
var bitmap:Bitmap;

sim = new Simulation(new Rectangle(0, 0, WIDTH, HEIGHT), CELL_SCALE);
var r:int, c:int;
for(r = 0; r < 120; r += CRATE_SIZE){
  for(c = 0; c < WIDTH; c += CRATE_SIZE){
    sim.addCollider(c, r, CRATE_SIZE, CRATE_SIZE);


// render
bitmap.bitmapData.fillRect(bitmap.bitmapData.rect, 0x00000000);
var rect:Rectangle = new Rectangle(0, 0, SCALE - 2, SCALE - 2);
for(i = 0; i < sim.colliders.length; i++){
  bitmap.bitmapData.fillRect(sim.colliders[i], 0xFFFFFFFF);
  rect.x = sim.colliders[i].x + 1;
  rect.y = sim.colliders[i].y + 1;
  bitmap.bitmapData.fillRect(rect, 0xFFCCCCCC);
Comments Off on Crater


AIROUYAFacade is a native extension to use OUYA services. It provides developers with a set of useful methods to customize the gameplay sessions and allow in-app purchases, for instance. Among the available features, the extension allows an application to read and write game data (e.g. highscore), monitor menu events and get the name and uuid of current gamers.

It is also possible to work with in-app purchases, read product information, fire purchase requests and receive receipts. There are events that can be used to monitor all actions, which are asynchronous. Despite of that the extension has an internal cache mechanism to prevent unnecessary server communication.


var ouyaFacade:AIROUYAFacadeANE;
ouyaFacade = AIROUYAFacadeANE.getInstance( "your-developer-key-here", key );

ouyaFacade.addEventListener( AIROUYAFacadeANEEvent.GAMER, onGamer );
ouyaFacade.addEventListener( AIROUYAFacadeANEEvent.PRODUCT, onProduct );


ouyaFacade.putGameData( "high_score", "1,2,3,4,5,6,7,8,9,10" );
var test:String = ouyaFacade.getGameData( "high_score" );

ouyaFacade.requestProductList( "test", "test_entitlement" );

function OUYAMenuUpdate( facadeEvent:AIROUYAFacadeANEEvent ):void {
	trace( "OUYA Menu Event!" );

private function onGamer( facadeEvent:AIROUYAFacadeANEEvent ):void {	
	var gamer:Gamer = facadeEvent.data as Gamer;
	if( null != gamer ) {
		trace( "Gamer Username: " + gamer.username + ", and UUID: " + gamer.uuid );
	var gamer2:Gamer = this.ouyaFacade.getGamerInfo();
	if( null != gamer2 ) {
		trace( "Gamer 2 Also shows Username: " + gamer2.username + ", and UUID: " + gamer2.uuid );

private function onProduct( facadeEvent:AIROUYAFacadeANEEvent ):void {	
	var products:Vector = this.ouyaFacade.getProductList();
	var i:int = 0;
	while( products.length > i ){
		trace( "Product " + i + " is: " + products[i].name + " and costs: " + products[i].originalPrice );
	ouyaFacade.addEventListener( AIROUYAFacadeANEEvent.PURCHASE, onPurchase );
	ouyaFacade.makeProductPurchase( products[0].identifier );

private function onPurchase( facadeEvent:AIROUYAFacadeANEEvent ):void {	
	trace( "Product Purchase Request Result: " + facadeEvent.status + ", " + facadeEvent.data );
	ouyaFacade.addEventListener( AIROUYAFacadeANEEvent.RECEIPT, onReceipt );

Experimenting with OUYA using Flixel Community

Things have been a bit quiet over here these days, so it’s time to break the radio silence. I have been working on several small projects for the last month and a half, but most of them are not related to gamedev at all. What I really want to share is that I will be teaching at a OUYA gamedev workshop at my university next week.

I have been organizing and preparing materials to use in the workshop. As a consequence I have been experimenting with OUYA using Flixel Community a lot. I made a very simple test today: compiled an early game prototype against the latest versions of AIR SDK and Flixel Community dev, packaged the result as an APK and uploaded it to my OUYA. And it worked!


The controls are not responding because the game has no gamepad support, but I was extremely happy to see a 1920 x 1080 game running steady at 60 FPS.


I have to stress that I was using a developer version of Flixel Community, powered by the brand new GPU render. The game I used was developed using Flixel 2.54, so I had to adapt it to use Flixel Community’s API. I made no code changes other than adjusting methods and packages names that changed. That’s a huge win!  :)


OUYA development improved a lot since the Chupacabra firmware update, released in August. It’s now possible to deploy APK files using a web browser, all you have to do is drop the APK in the upload page (something like and it will be transferred to and installed in the console. That simple!

After my workshop, I will release all the code and docs I used. I will probably create a pull request to enhance the AIR section in the ouya-sdk-examples at Github, to help other developers to port their games to OUYA. More OUYA dev articles to come soon.

flixel community gamedev GPU OUYA