Getting Started

Install Haxe

First, you will need to install Haxe and Neko. OpenFL uses Haxe to power the build process, and Neko to run the command-line tools. Both are included in the following installers, one for each platform:


macOS users: You will need to run the following commands to finish your install:


```bash sudo haxelib setup /usr/local/lib/haxe/lib sudo chmod 777 /usr/local/lib/haxe/lib ```

Linux users: The versions of Haxe and Neko distributed on Linux package repositories can be old, or experience other issues after the install, so we recommend that you use the above install script instead.

Install OpenFL

With the latest versions of Haxe and Neko installed, open a command-prompt (Windows) or terminal (macOS/Linux) and run these commands:

haxelib install openfl
haxelib run openfl setup

To confirm that OpenFL is installed and working properly, try running the “openfl” command:

openfl

If you are upgrading, you can find more information about changes here and here.

Run a Sample

OpenFL includes a set of sample projects, from simple tutorials to more complex demos. This is a good way to confirm that OpenFL is installed properly.

You can use the “openfl create” command for a list of available samples.

openfl create

For example, here is how to build and run the DisplayingABitmap sample on HTML5:

openfl create DisplayingABitmap
cd DisplayingABitmap
openfl test html5

Next Steps

Now that OpenFL is installed, you can choose a code editor or start creating your first project!


Improve this page