[SOLVED] Lime.text.Font should be flash.text.Font

I’ve started to get the following when trying to compile. Works also with PiratePig demo.
C:/HaxeToolkit/haxe/lib/openfl/2,2,8/openfl/Assets.hx:157: characters 10-14 : lime.text.Font should be flash.text.Font

Also, I’ve got something about that I can’t access sys package while targeting flash. It was before I ran openfl setup.

What version of lime do you have? It could be too recent for your version of openfl.

You can’t use the sys package on the flash target (or the html5 one), it’s composed of system api which don’t exist for these targets.

haxelib_client: 3.2.0-rc.2 [3.2.0-rc.3]
hxcpp: [3.2.37]
layout: [1.2.0]
lime-samples: [2.2.0]
lime: 2.2.1 [2.3.0]
openfl-bitfive: [2.1.6]
openfl-samples: [2.2.2]
openfl: [2.2.8] 3.0.0-beta
swf: [1.8.2]

i don’t really know what is in brackets and outside them)

and for sys - this error also was somewhere from Lib class of openfl.

The version between brackets is the currently selected one.
So you have lime 2.3.0 and openfl 2.2.8, that’s the latest lime but not the latest openfl, they probably don’t match.

Do haxelib set openfl 3.0.0-beta.3, that’s using a new codebase so if things don’t work after that (tell us about it so we can fix it) add -Dlegacy to your command to use the old one (or put <set name="legacy" /> in your project.xml before <haxelib name="openfl" /> for a permanent solution).

Oh, that’s weird, do you still have the error message?

1 Like


error with sys package disappeared after i made openfl setup, may be i have gotten some other issues with versions :smile: