How to integrate API to openFl project?

can anybody provide me some instructions of how to integrate API to openFl (not stencyl) project?

Hi, I’m not sure myself but I have asked someone who will know more. They should reply here soon.

Hi wuprui,
Archive contains library for integration with flash and js versions of IDNet API. In addition Main.hx with examples of use. You can use it with openFL

https://goo.gl/PbRG5Z

If You have any questions, You can ask in this thread. I am happy help

1 Like

Thanks. Is there an example of how save something?

In example just initialization and calling login popup.
But in this library exist saveUserData, setAchievement and scores. You can make it with this library

Sounds like it’s not using the as3 sdk. So if you need to make your own api calls, there is a API Reference for that information.

Hi codir2,

I’m new with openfl and idnet.

I try run your idnet openfl example on openfl 3.6.0 with target HTML5 got error like this :

src/idnet/js/_Social.hx:60: characters 23-52 : js.html.Document has no field createScriptElement
src/idnet/js/_Social.hx:64: characters 2-16 : js.html.Document has no field head
src/idnet/js/_Social.hx:164: characters 39-68 : js.html.Document has no field createScriptElement
src/idnet/js/_Social.hx:166: characters 2-16 : js.html.Document has no field head
src/idnet/js/_Social.hx:168: characters 39-68 : js.html.Document has no field createScriptElement
src/idnet/js/_Social.hx:170: characters 2-16 : js.html.Document has no field head

For flash version working fine.

Is there any solution about this?

Hi,

I think I have found the solution.

Change import js.html.Document; to import js.html.HTMLDocument; at idnet/js/_social.hx line 9

Y8 Games