Questions tagged [haxe]

Haxe can build cross-platform applications targeting JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash, and allows access to each platform's native capabilities. Haxe has its own VMs (HashLink and NekoVM) but can also run in interpreted mode. Code written in Haxe can be compiled to any target Haxe supports.

Haxe is an open source, multiplatform programming language that allows developers to JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash, NekoVM and HashLink using the same syntax.

Haxe includes a set of common functionality that is supported across all platforms, such as numeric data types, text, arrays, binary and some common file formats. Haxe also includes platform-specific APIs. It can be integrated with existing libraries using extern definitions (e.g: JavaScript) or leveraging the compiler to connect directly to native libraries (e.g: .jar for Java and .dll for C#).

Haxe can also compile to bytecode (Neko, HashLink or JVM), which runs in the runtime created by the same developer.

Haxe is a garbage-collected language. Some target platforms do not have a native garbage collector - in those cases Haxe provides its own runtime, like in the case of C++, to take care of GC and other things.

Haxe ships with its own package manager called .

Haxe was developed by Nicolas Cannasse and other contributors and is backed by the Haxe Foundation. It was named Haxe because it was short, simple, and "has an X inside", which the author humorously asserts is necessary to make any new technology a success. Haxe is pronounced "hex" /heks/, although many community members pronounce it "hacks".

Haxe is known for its multitude of game development and multimedia libraries. With frameworks like , or built on top of Haxe, developers can target platforms like:

All from a single code base.

Popular game engines include , , and . The powerful physics engine is written in Haxe as well.

With UI frameworks like and , user interfaces can be created for a wide range of target platforms. With , there is also a feature-rich MVC web framework available. To create reactive web applications using a virtual DOM, coconut.ui can be used, which shares significant similarities with .

1627 questions
0
votes
3 answers

How to build javascript files from Haxe using Sublime Text

I have installed Haxe for OS X, and I have installed the Haxe code completion package for Sublime Text. So far this is working - I can type Haxe code and Sublime Text will recognize it. I have read the Haxe tutorials and documentation, but I can't…
Kokodoko
  • 26,167
  • 33
  • 120
  • 197
0
votes
1 answer

Haxe Curl - Failed to load library : curl.ndll

I used haxelib to install Haxe-Curl and run it on a project. However, trying to import or use the package gives me the following compiler error for neko: Uncaught exception - load.c(237) : Failed to load library : curl.ndll (dlopen(curl.ndll, 1):…
mtrc
  • 1,317
  • 3
  • 16
  • 39
0
votes
3 answers

haxe uninitialized member variable inconsistent across platforms

I'm trying to cross compile an existing flash app written in haxe into javascript using openfl and haxe. Under flash I can do the following: class foo { var bar : Int; public function new() { trace(bar); //under flash prints 0,…
tesract
  • 53
  • 10
0
votes
2 answers

Haxe 2.09 can not compile ["Zebra", "Gnu", "Elephant"].map(callback(String.toLowerCase));

Haxe 2.09 can not compile this: ["Zebra", "Gnu", "Elephant"].map(callback(String.toLowerCase)); It complains with this error: String has no field toLowerCase Though it'd be easier to write that line without using Lambda.map, but I'd really want to…
the_yellow_logo
  • 675
  • 5
  • 13
0
votes
1 answer

Haxe, OpenFL: draw TextField on Bitmap in a loop

So, this app I am making for mobile phones with Haxe, and OpenFL. I have a very long text which I load from a text file, and put it into a very tall TextField. However I want to convert this into a Bitmap, due to performance issues. Again, however,…
Zeeshan Ahmad
  • 345
  • 3
  • 17
0
votes
1 answer

OpenFL Load External SWF and get the assets

I'm trying to load a swf file into another swf and then extract the assets from the first. Both swf files are being created using OpenFL (compiled in FlashDevelop). I can load the external swf easily and convert it to a SWF object (haxelib swf…
flinthart
  • 534
  • 1
  • 4
  • 14
0
votes
1 answer

Haxe Map only retrieves `null`

I'm having trouble using Maps in Haxe. I'm trying to create a grid of Tile objects and add them to the Map using their index on the grid as a key. However, when I try to retrieve a Tile from the map using an index I always get a value of null. Could…
0
votes
1 answer

How to properly create Android/iOS Expansion Files

Is there a proper way to create expansions files for iOS and Android apps using the command line tool (haxe or lime) or is it always just by manually making a .zip file and renaming it to match the correct pattern?
Creative Magic
  • 3,143
  • 3
  • 28
  • 47
0
votes
0 answers

Large app size in AppStore. Is it allowed to download external assets?

I've developed a game, it's total file-size with all assets is about 220Mb. The game is developed in Haxe language with a framework called openFL - that allows to compile iOS and Android versions from a single source. Because Android's Google Play…
Creative Magic
  • 3,143
  • 3
  • 28
  • 47
0
votes
1 answer

libGL error with Linux target of OpenFL

I'm planning on doing game development with Haxe, utilizing its C++ target, and for that I chose the HaxeFlixel framework, which uses OpenFL as its backend. The "hello world" test runs just fine with flash, HTML5 seems to work (minus sound), though…
Zauberin Stardreamer
  • 1,284
  • 1
  • 13
  • 22
0
votes
0 answers

How does Map handles index collision?

I'm trying to create a collection that maps a certain Type to my Vector2i type in this fashion: Collection I'm translating a project I had previously in C# to Haxe. In C# I only had to implement an interface in Vector2i to be able…
MouseCaneta
  • 135
  • 1
  • 8
0
votes
1 answer

Using jQueryExtern with Haxe Synax Error

I have just started to use Haxe and imported the jQueryExtern, when I'm trying to use new JQuery(".roles:checked").each(function(){ }); I'm getting a Compiler error: src/LeftList.hx:69: lines 69-71 : Void -> Void should be Int ->…
Nevo David
  • 49
  • 1
  • 7
0
votes
2 answers

Get / Set on a Dynamic Object in Haxe using Reflect and String id

I have this actionScript3 Code I'm porting to haxe. public static const DATA_COMPLETE_LEVELS : String = "save_game_data_complete_levels"; private var _completedLevelKeys:Vector.; public function get completedLevelKeys():Vector.
yannicuLar
  • 3,083
  • 3
  • 32
  • 50
0
votes
1 answer

Sprite text at incorrect position

I'd like to add text to a working button. Currently, the code below prints the text at 0,0 rather than on the sprite button. soundButton.graphics.beginFill(0xFFCC00); soundButton.graphics.drawRect(0,900, 200, 50); …
Jocala
  • 243
  • 1
  • 4
  • 16
0
votes
1 answer

Where is my button?

I'm new to haxe/openfl and am trying to simply put a button on a screen. The code below gives me a white screen, no button or reaction to a screen press via trace. Can someone tell me what I'm doing wrong? package; import…
Jocala
  • 243
  • 1
  • 4
  • 16