HTML5 target compilation errors when including flixel-addons in basic hello world.

225 views
Skip to first unread message

Adam Harte

unread,
Dec 16, 2014, 11:08:27 PM12/16/14
to
I created a basic project using:

flixel tpl -n "HelloWorld"

Then I uncommented the haxelib flixel-addons from the Project.xml so it is included in my game.

<haxelib name="flixel-addons" />

When I run the game for Flash target everything is fine, but if I try and run for HTML5 target, I get errors. If I don't include the flixel-addons haxelib, then the game runs for both flash and html5 targets without any trouble.

I am using:
Windows 8
Haxe 3.1.3
flixel 3.3.6
flixel-tools 1.0.2
flixel-addons 1.0.3
flixel-templates 1.0.2
openfl 2.1.7

Here is my output:

Building HelloWorld
haxelib run openfl build C:\Dev\Projects\HelloWorld\Project.xml html5
C:/HaxeToolkit/haxe/lib/lime/2,0,1/lime/system/System.hx:79: characters 2-24 : Class<ApplicationMain> has no field create
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:25: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:25: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:25: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:25: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:25: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:165: characters 9-40 : openfl.display.BitmapData should be flash.display.BitmapData
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxAssets.hx:176: characters 9-40 : openfl.media.Sound should be flash.media.Sound
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/frontEnds/SoundFrontEnd.hx:144: characters 3-52 : openfl.media.Sound should be flash.media.Sound
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/FlxSprite.hx:29: characters 8-50 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/FlxSprite.hx:29: characters 8-50 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/FlxSprite.hx:29: characters 8-50 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/FlxSprite.hx:29: characters 8-50 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/FlxSprite.hx:29: characters 8-50 : Defined in this class
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:22: characters 8-14 : flash.display.BitmapData should be openfl.display.BitmapData
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:22: characters 8-14 : For function argument 'image'
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:20: lines 20-26 : Missing super constructor call
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:34: characters 15-27 : flash.geom.Rectangle should be openfl.geom.Rectangle
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:34: characters 15-27 : For function argument 'rectangle'
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:75: characters 14-18 : flash.geom.Rectangle should be openfl.geom.Rectangle
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/layer/TileSheetExt.hx:75: characters 14-18 : For function argument 'rectangle'
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:29: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:29: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:29: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:29: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:29: characters 0-39 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:32: characters 0-42 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:32: characters 0-42 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:32: characters 0-42 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:32: characters 0-42 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/tile/FlxTilemap.hx:32: characters 0-42 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:20: characters 8-55 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:20: characters 8-55 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:20: characters 8-55 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:20: characters 8-55 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:20: characters 8-55 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:23: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:23: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:23: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:23: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/debug/Window.hx:23: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxSound.hx:282: characters 3-42 : openfl.media.Sound should be flash.media.Sound
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/input/mouse/FlxMouse.hx:28: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/input/mouse/FlxMouse.hx:28: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/input/mouse/FlxMouse.hx:28: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/input/mouse/FlxMouse.hx:28: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/input/mouse/FlxMouse.hx:28: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/frontEnds/SoundFrontEnd.hx:170: characters 3-41 : openfl.media.Sound should be flash.media.Sound
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:19: characters 8-52 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:19: characters 8-52 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:19: characters 8-52 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:19: characters 8-52 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:19: characters 8-52 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:22: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:22: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:22: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:22: characters 8-54 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/system/FlxPreloader.hx:22: characters 8-54 : Defined in this class
export/html5/haxe/ApplicationMain.hx:68: characters 23-67 : flixel.system.FlxPreloader should be flash.display.DisplayObject
export/html5/haxe/ApplicationMain.hx:68: characters 23-67 : For function argument 'o'
export/html5/haxe/ApplicationMain.hx:201: characters 26-35 : flixel.system.FlxPreloader should be flash.display.DisplayObject
export/html5/haxe/ApplicationMain.hx:201: characters 26-35 : For function argument 'o'
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/ui/FlxTypedButton.hx:14: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1144: characters 5-12 : Invalid assign
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/ui/FlxTypedButton.hx:14: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1145: characters 13-26 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/ui/FlxTypedButton.hx:14: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1146: characters 14-28 : Unknown identifier : __image
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/ui/FlxTypedButton.hx:14: characters 8-49 : Defined in this class
C:/HaxeToolkit/haxe/lib/openfl/2,1,7/openfl/Assets.hx:1150: characters 5-21 : Unknown identifier : __loadFromBase64
C:/HaxeToolkit/haxe/lib/flixel/3,3,6/flixel/ui/FlxTypedButton.hx:14: characters 8-49 : Defined in this class
export/html5/haxe/DefaultAssetLibrary.hx:47: lines 47-59 : Field exists overloads parent class with different or incomplete type
export/html5/haxe/DefaultAssetLibrary.hx:47: lines 47-59 : id : String -> t : openfl.AssetType -> Bool should be id : String -> type : String -> Bool
export/html5/haxe/DefaultAssetLibrary.hx:47: lines 47-59 : openfl.AssetType should be String
export/html5/haxe/DefaultAssetLibrary.hx:61: lines 61-65 : Field getBitmapData is declared 'override' but doesn't override any field
export/html5/haxe/DefaultAssetLibrary.hx:108: lines 108-114 : Field list overloads parent class with different or incomplete type
export/html5/haxe/DefaultAssetLibrary.hx:108: lines 108-114 : t : openfl.AssetType -> Array<String> should be type : String -> Array<String>
export/html5/haxe/DefaultAssetLibrary.hx:108: lines 108-114 : openfl.AssetType should be String
export/html5/haxe/DefaultAssetLibrary.hx:116: lines 116-129 : Field loadBitmapData is declared 'override' but doesn't override any field
Build halted with errors (haxelib.exe).
Done(1)

Adam Harte

unread,
Dec 17, 2014, 9:57:02 PM12/17/14
to haxef...@googlegroups.com
Just posted an issue on the github repo for this: https://github.com/HaxeFlixel/flixel-addons/issues/143

Adam Harte

unread,
Dec 18, 2014, 4:48:39 PM12/18/14
to haxef...@googlegroups.com
Just updated to flixel-tools 1.1.0 and still have the same issue.

Trieu Tran Quoc

unread,
May 18, 2015, 1:00:34 AM5/18/15
to haxef...@googlegroups.com
Maybe flixel-tools, flixel-ui, flixel-addons have the same issue :(.
Did you found solution to solve this problems?

SruloArt

unread,
May 18, 2015, 5:00:31 AM5/18/15
to haxef...@googlegroups.com
When the html5 custom backend is not working, you can try adding this flag to your project.xml (before you include flixel ("<haxelib name="flixel"/>")! ): "<set name="no-custom-backend" />" (withot the outer " " naturally). There are two backends for html5, bitfive, which is not currently compatible with the latest lime/openfl release (apparently) and the original openfl backend, that works fine (the flag makes your project revert to it).

Trieu Tran Quoc

unread,
May 18, 2015, 9:21:22 AM5/18/15
to haxef...@googlegroups.com
Great, I ported to html5 succesfully. Thank you very much :).
But there is font error, I tried to use font format .ttf, .svg, .woff but it show incorrectly (font I use is time new roman.

FryDay

unread,
May 18, 2015, 12:33:24 PM5/18/15
to haxef...@googlegroups.com
I tried this and got the following errors:
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:98: characters 2-24 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:99: characters 2-24 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:100: characters 2-24 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:101: characters 2-24 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:102: characters 2-24 : Class<ApplicationMain> has no field config
C:/HaxeToolkit/haxe/lib/lime/2,4,1/lime/system/System.hx:103: characters 2-24 : Class<ApplicationMain> has no field create
export/html5/haxe/DefaultAssetLibrary.hx:319: characters 21-43 : Class<ApplicationMain> has no field config
export/html5/haxe/ApplicationMain.hx:331: characters 2-7 : Field get_stage is declared 'override' but doesn't override any field
export/html5/haxe/ApplicationMain.hx:332: characters 0-35 : Defined in this class

FryDay

unread,
May 18, 2015, 12:42:22 PM5/18/15
to haxef...@googlegroups.com
I got it. If anyone else has this issue, remove <haxelib name="openfl-html5"/> from your project.
Reply all
Reply to author
Forward
0 new messages