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
1 answer

Compiling a CPP library into a DLL, can't find stdlib

Generally speaking, I'm trying to compile a CPP library into my own library as a DLL for Android (or, more accurately, an .so file). When my toolkit (more on this later) runs the following lines: arm-linux-androideabi-g++ -Iinclude/common…
steve richey
  • 497
  • 3
  • 16
0
votes
1 answer

Strange behaviour with Type.createInstance in Haxe

Shouldn't the following code throw an error instead of executing? class Weird { public static function main() { var weirdPerson = Type.createInstance(Person,[["What", "the", "?"]]); trace(weirdPerson.likesCake); //…
0
votes
1 answer

ReferenceError: SomeName is not defined (exposing class in Haxe)

I am a beginner of Haxe. I tried to do FizzBuzz TDD. I used Mocha and expect.js. I exposed the Haxe class by @:expose("SomeName") to be able to be seen from test. However, the test cannot find FizzBuzz class. FizzBuzz.hx package…
Feel Physics
  • 2,783
  • 4
  • 25
  • 38
0
votes
2 answers

Is there any way to limit Generics in certain types?

I need a generic based class that should work only for two primitive type. those types are not relevant to each other ( Not Implemented Not Extended each Other). is there any way?
J.J
  • 46
  • 6
0
votes
2 answers

Haxe to AS3: Export haxe standard library to a specific package (to avoid ambiguous naming conflicts)

I have a haxe library that I need to compile to JS and AS3. I already have the JS part working fine and can use the exported code as is within node.js. However I have the following problem when compiling to AS-3. The haxe compiler includes the haxe…
santiagoIT
  • 9,411
  • 6
  • 46
  • 57
0
votes
2 answers

How to cross compile Flash SWF file(s) into Keil Compilable C/C++ file(s)

I have been doing research in cross compile flash SWF files into C/C++ source files There are plenty of tools in decompiling SWF files into plain-text files formats. The Free SWF Decompiler provides plenty opensource solution on this. To decompiler…
guru4tw
  • 21
  • 4
0
votes
1 answer

Unable to install lime on windows 7

I have Haxe Compiler version 2.10 and Haxe Library Manager 1.03. I have downloaded lime-1,0,1.zip and placed it on the haxe installation folder. Then running haxelib local lime-1,0,1.zip it is showing C:\>haxelib local lime-1,0,1.zip Unknown…
user3306669
  • 117
  • 1
  • 11
0
votes
2 answers

Does Haxe have named blocks or similar?

Is there an equal to named blocks in Haxe (as there was in Action Script 3)? I don't know if 'named block' is the correct term. Given the following example (a basic example to highlight a point): singleCollision: { for (teleport in…
Chris
  • 54,599
  • 30
  • 149
  • 186
0
votes
1 answer

OpenFL - iOS - Tags for launcher screenshots in application.xml

So I've developed in OpenFL, app for iOS, and I want to compile it as so. But apparently I can put tags in application.xml that indicate the path to Default.png, etc... Can someone list those tags for me please? (I guess the icon only needs one…
Zeeshan Ahmad
  • 345
  • 3
  • 17
0
votes
1 answer

Haxe documentation XML: how to exclude standard library?

I want to make a small tool in Haxe, that inspects the haxedoc comments. I figured the best way to get these comments is to use the "haxe -xml" option, and load in the resulting XML file. However, when I generate the XML, it seems to include the…
0
votes
2 answers

Haxe: How can I setup a class to store data in an array of type that I pass in the constructor

I am coding in Haxe, Lime, OpenFl. I am trying to set up a Class to store data in a Map, referenced by class instance. The class type is to be passed in the constructor, via inference. But I am quite new to all this and can't quite figure out the…
user2765977
  • 491
  • 4
  • 18
0
votes
1 answer

Cordova, Appcelerator, Titanium and Haxe which is better for both desktop and mobile

I need something where I can write code once and that will run on desktop browser and mobile. For mobile devices it should be native or hybrid app and in desktop it should open in browser. I need very minimum device API for mobile devices since the…
user3306669
  • 117
  • 1
  • 11
0
votes
2 answers

Is there a way to scroll the complete content of the cocktailview?

the situation: The rendered document is bigger than the available cocktailview.viewport. I understand, the HTML intrinsic scrolling is not yet available (issue #358). Is there a way to scroll the complete content of the cocktailview (scrollRect et…
hamid toosi
  • 95
  • 1
  • 10
0
votes
1 answer

Array index calculation out of bounds

Here's some Haxe, written as part of a game in HaxeFlixel. var fx:Float = 236/43; //Some float var ix:Int = cast(fx); //Cast to an int someArray[v]; //Access an array The array access causes a violation. I can't think of a reason why this…
mtrc
  • 1,317
  • 3
  • 16
  • 39
0
votes
1 answer

Building Air Apps (Desktop) with Haxe - Steps

I'm a developer in ActionScript and while I'm watching Haxe as a language to be used by me, since besides the resemblance ActionScript, still be possible to make applications with output to flash yet. However I have a question about building AIR…