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

Haxelib Dependency to a git library

I would like to know if that's possible to declare a dependency to a library via GIT. My usecase is simple, I have some tools, that I would like to share between my projects, but I don't want to add them to haxelib (because this tools are not really…
Peekmo
  • 2,843
  • 2
  • 19
  • 25
0
votes
1 answer

Error when building Haxe project from Sublime Text 3

I'm getting the error: Traceback (most recent call last): File "/Volumes/Sublime Text/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_ return self.run(edit) File "HaxeComplete in /Users/graphic/Library/Application…
aardvarkk
  • 14,955
  • 7
  • 67
  • 96
0
votes
1 answer

Error setting scrollFactor on FlxSprite after update to HaxeFlixel 3.3.0

I just finished updating my HaxeFlixel install to 3.3.0 and after ironing out all the other upgrade changes I am still getting one error I can't find any explanation for. I am setting the scrollFactor property on the FlxSprites that make up my…
KLowe
  • 463
  • 1
  • 5
  • 9
0
votes
1 answer

Specific Regex Failing on Neko and Native

So I'm working on some cleanup in haxeflixel, and I need to validate a csv map, so I'm using a regex to check if its ok (don't mention the ending commas, I know thats not valid csv but I want to allow it), and I think I have a decent regex for doing…
Nico
  • 94
  • 9
0
votes
1 answer

What characters are legal for Haxe method/function names?

I'm creating a JSON-RPC library and I need to know what characters are allowed as Haxe method names. I know that I must be cautious of allowed method names in the target languages as well, but I'm trying to start with Haxe : )
Indolering
  • 3,058
  • 30
  • 45
0
votes
1 answer

Haxe: Import from neko, cpp and java sys trees

I want to use Haxe to write a library that can be used by other projects in various different languages. Currently I have at the top of my library: import neko.io.File; import neko.io.FileInput; import neko.io.FileOutput; import…
joeytwiddle
  • 29,306
  • 13
  • 121
  • 110
0
votes
1 answer

Flash IDE, Haxe & OpenFL - Invalid Data Swf Error #2136

We've recently run into a show stopping issue and can't seem to find any one else on the net who has the same problem (although there have been similar ones). We're currently developing a game using Haxe and OpenFL. We use FlashDevelop to code the…
SHiLLySiT
  • 153
  • 1
  • 13
0
votes
1 answer

Center in relative layout, JAVA (for admob haxe openfl native extension)

There was no option for centering a AdMob ad so i added the last bit of code, is this code correct? My compiler throws no error and the ad does not move to the center. I cannot find any information about relative layout in reference to centering. …
jjwallace
  • 168
  • 2
  • 16
0
votes
1 answer

OpenFL basic install on Windows doesn't work?

I went to http://www.openfl.org/archive/download/ and followed the steps for a really basic first test: haxelib install lime haxelib run lime setup lime install openfl lime create openfl:DisplayingABitmap When I try to run it with: cd…
Soulfire
  • 161
  • 3
0
votes
2 answers

Export flash-games as "embedables" to iOS and Android

Our situtation right now is that we have a couple of games built with flash / actionscript3, that we want to port to iOS / Android. If necessary we could potentially re-write all of these small games, though if that has to be done I want to redo it…
tschery
  • 153
  • 2
  • 15
0
votes
2 answers

haxe - Comparison of enums and strict order

I have a enum type: enum HandRank { HighCard; OnePair; Set; TwoPair; Straight; Flush; FullHouse; Quads; StraightFlush; RoyalFlush; } And I'd like to compare a pair of values to choose a better one. Something…
meps
  • 579
  • 2
  • 17
0
votes
2 answers

Haxe flash build raw bitmap data in bytearray EOF error

I have the XML and raw bitmap data for a bitmap font. I want to take the raw data and set the pixels in the BitMapData so I can make my font. Using haxe with the flash libraries. Whenever I run my code I keep getting this error: Error: Error #2030:…
user1261710
  • 2,539
  • 5
  • 41
  • 72
0
votes
1 answer

Interlocked functions in Haxe

I am new to Haxe. When I try to convert the following line from C# to Haxe using CS2HX: Interlocked.Increment(ref this.fieldName); I get error from CS2HX: ref/out cannot reference fields, only local variables Now this makes me wonder - are…
Roland Pihlakas
  • 4,246
  • 2
  • 43
  • 64
0
votes
1 answer

How to convert Bitmapdata to Base64 format?

Is there any example which helps in generating Base64 based image from Bitmapdata? I know I have to use encode in bitmapdata, but I am not sure how to use it? It takes (rect : flash.geom.Rectangle, compressor : flash.utils.Object, ?byteArray :…
simo
  • 23,342
  • 38
  • 121
  • 218
0
votes
0 answers

haxe: How to create neat observer pattern prototype

I have created simple observer prototype: class CObservable { public function new() { mObservers = new Array(); } public function sign(aObserver:T):Bool { for (observer in mObservers) if (observer ==…
meps
  • 579
  • 2
  • 17
1 2 3
99
100