How can OpenFL be used to generate a "library"?

131 views Asked by At

I want to build a cross-platform library for generating images of certain type (e.g. retail receipts). As I get it, the only library that supports working with images and font drawing in Haxe universe is OpenFL. The question is the following - is it possible to create an OpenFL project that compiles to library? Or at least generates sources to be used as linked library? By default OpenFL generates an executable application which is not appropriate to me.

Target platforms are iOS and Android, i.e. C++ target should work for me.

2

There are 2 answers

0
alebianco On

As far as I know, you just create a standard haxe library and declare openfl as a dependency. Take a look at some of the libs on haxelib for an example..

0
player_03 On

I believe this is what Lime is for.

Lime is actually part of the OpenFL project, but it's lower-level than OpenFL itself. It was split off from the main project in response to people who wanted to use some of OpenFL's tools without it automatically opening a window.

Lime recently added asset support, so it should work for your purposes.