I was trying to call a function from OpenFL to the wrapping HTML.
I could do it, but it seems that the name i pass in ExternalInterface.call("") is the name of the function in the global javascript scope.
It doesn’t seem right, it can bring issues in case of multiple openFL integration. I was expected to see a lime function that would make the link between the function name that External.call is calling, and the actual javascript function that will be associated with it.
something like
lime.exposeFunction(“function name”, my_function);
In my case, I set up something like your exposeFunction example in the page javascript and used a generic ‘SendExternalMessage’ ExternalInterface function to call those mapped functions
thanks, but if i understand well,
that doesn’t adress my problem, that will make a direct relation between my compiled haxe code and the window global js scope, which is not really a good practice.