Running a Haxe callback from Java


How do you get Java notifications back to Haxe’s method?:sweat_smile:

OpenFL 8.0.2 released

You should be able to pass a callback from Haxe to Java, but it’s important that you do not call the Haxe method until it is in the right thread. Most of the Java runs in a different thread than the Haxe render thread.

Sort of like this:


Note that Java doesn’t accept callbacks as is, but you pass an object which has methods.