(SOLVED) Sublime Text 3 and OpenFL compilation

We should post that as an issue to the Github page for the plugin

i’ve notified developer already

Awesome, thank you :success:

I ended up having a similar issue with OSX and Sublime 3. I had to restart Sublime and recreate the Sublime project. Then Control+Shift+B would pull down the menu and I can pick ‘Flash - test’ or another build target. CMD+B does not work for me, I always get this error for an OpenFL project:

``Fatal error: exception Failure(“File not found build.hxml”)```

However, Control+ENTER does trigger a build and the swf to compile.

I’ve had a very similar problem today where even when creating an empty project with the openfl command and loading the root dir in sublime ( the folder with the same name as the project ) I had the file .hxml show up instead of the target list. I also had this “Main.js” in the status bar even tho I was editing “Main.hx”.

My issue was very simple to solve, but took me forever to find… I always indent my xml files, and I indented my project.xml like this:

    <window
        background="#181818"
        width="1024"
        height="640"
        orientation="landscape"
        vsync="true"
        fps="60"
    />

I removed all my indentations, which resulted in this:

    <window background="#181818" width="1024" height="640" orientation="landscape" vsync="true" fps="60" />

Once I removed the indentation, everything worked as expected.
So if you have problems with the target selection, make sure your project.xml doesn’t have any weird indentation since it seems the compiler doesn’t like it. :stuck_out_tongue:

If you still want to split that into different lines, you can use multiple tags:

    <window background="#181818" />
    <window width="1024" height="640" />
    <window orientation="landscape" />
    <window vsync="true" />
    <window fps="60" />