Nothing work in OpenFl under HaxeDevelop

Hi everyone, I can’t get the HTML5 compilation to work from my personal projects.
On the command line and with the tutorials of the openfl website, everything works perfectly, if I create a new project in haxeDevelop, that I put this simple code and that I execute it.

package;

import openfl.display.*;

class Main extends Sprite {

public function new () {
	
	super ();
	
	var _circle:Shape = new Shape();
	_circle.graphics.beginFill(0xFF0000, 1); 
	_circle.graphics.drawCircle(200, 200, 50);
	_circle.graphics.endFill();
	this.addChild(_circle);
}

}


I have this error and I do not know what it refers … apart from a length …

If i load this project in FlashDevelop and compile, i have a black screen…but not this error…
I can’t spot the problem :sob::sob::sob:

I specify that my project properties are default for openfl.

poperties01 poperties02 poperties03

With FlashDevelop, if you do Project > Test Project, it opens your web browser at http://localhost:2000, right ?
If that’s the case, open the browser console (e.g. with the F12 key), and check for errors.

Also make sure that html5 is selected in the dropdown, next to the configuration (Debug/Release) dropdown.

Regarding HaxeDevelop, I don’t know since I don’t use it :stuck_out_tongue:

Hello @tour1st, in Opera, it work well, in Firefox, Black Screen, and in Chrome, i have this errors:
error_chrome

Houlala, no, sorry, it also works in chrome, I don’t really understand, but Chrome reloads an old compilation! I do F5 several times, nothing changes, except if I drag the good HTML on Chrome (I force it lol).

What do you use as an editor for openfl?

You may use CTRL+F5 to force your web browser to refresh the page, or even clear the browser cache in some cases.
I use FlashDevelop as my IDE to develop anything in haXe :slight_smile:

Thank you for all the help provided, it is more than likely that I will come back quickly, because there is very little, see no video tutorial in French, English, in writing it goes thanks to google which translates the pages. : D
Yes, FD is a little higher, already at the level of auto-completion and signature of methods. I think I will stay in FD …

@Alain_Mazy, I’ve had lots of issues with FlashDevelop lately, but I’m still using it.

I’d avoid the current nightly/development of FlashDevelop for the moment as there’s a show stopping bug in it and stick to the latest (albeit dated) release or an older nightly/development build if you have one.

I too have had the issue you detailed above and for now the simplest way around it, is to run the build command from the command line yourself, when building for HTML5. The Neko/Windows targets don’t seem to have this issue.

Open the command line in your project folder. To do this, right click on your top project folder in the Project panel and select Command Prompt.
Run this command to build and run the HTML5 target:
openfl test html5

1 Like

Feel free to join the Discord ( https://discordapp.com/invite/tDgq8EE ) to get faster interactions with people, there are even a few french speaking guys (including me) :slight_smile:

@Bink, I have flashdevelop 5.3.3.1, he spat once at the opening, but for the moment it works well. haxe has shortcomings in auto-completion, notably in some method signatures. flashdev don’t have this problem. About windows targeting, what should I install? because I have an error with the compiler:

Error: Could not automatically setup MSVC

@tour1st, I speak only technical English, therefore, grammar and conjugation are almost absent from my knowledge. the advantage of a forum is I can take more time to reply…:sweat_smile:

As mentionned in the documentation, you’ll need Microsft Visual C++ (MSVC) to build your application for the Windows target : https://www.openfl.org/learn/haxelib/docs/core-architecture/

@Alain_Mazy, install Visual Studio Community (https://visualstudio.microsoft.com/vs/community/), making sure you install the C++ component.

If that doesn’t solve the issue, try rebooting after the install to ensure the environmental paths have refreshed. Failing that, you may need to manually add it to your path.

Last I tested FlashDevelop (and I assume HaxeDevelop) launched HTML5 content directly with cache enabled so you would see previous content unless you emptied the cache or forced a hard reload of the page.

The lime run html5 starts a local web server with cache disabled so you always see current content :slight_smile:

1 Like