Targeting mobile native apps

Hi,

Do you use

  1. straight native compilation as openfl + ios sdk or
  2. haxe + phaser.js and the html5 wrapper as cordova or intel xdk or
  3. swf + the air sdk?

jb

Most projects use native compilation, though some use HTML5 for additional targets (like Windows Universal Apps)

EDIT: Although I think I’ve seen SWF + AIR using OpenFL as well :slight_smile:

I’m currently using AIR by exporting my OpenFL code as swc libraries and then importing it on AIR projects. I had to create a simple class named “Lib” on a package named “flash” to make it work:

package flash 
{
  import flash.display.Sprite;
  public class Lib 
  {
    public static var current:Sprite;
    public function Lib() 
    {
    }
  }
}

This class must have a static “current” Sprite variable that you must set as the main class of your project:

Lib.current = this;

I’m currently looking for a way to directly build AIR applications from the OpenFL code using FlashDevelop.