Compilation error: BitArray has no field get

When I try to build my project, I got this error:

Running Pre-Build Command Line…
cmd: “C:\HaxeToolkit\haxe/haxelib” run lime build “app-client.xml” flash -release -Dfdb
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:15: characters 18-26 : format.swf.utils.BitArray has no field get
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:62: characters 4-12 : format.swf.utils.BitArray has no field set
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:62: characters 28-36 : format.swf.utils.BitArray has no field get
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:66: characters 4-12 : format.swf.utils.BitArray has no field set
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:66: characters 28-36 : format.swf.utils.BitArray has no field get
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:70: characters 4-12 : format.swf.utils.BitArray has no field set
H:/haxelibs/lib/swf/2,2,3/format/swf/utils/BitArray.hx:70: characters 28-36 : format.swf.utils.BitArray has no field get
H:/haxelibs/lib/swf/2,2,3/format/swf/SWFData.hx:310: characters 9-17 : format.swf.utils.BitArray has no field get
H:/haxelibs/lib/swf/2,2,3/format/swf/SWFData.hx:872: characters 17-25 : format.swf.utils.BitArray has no field get
Build halted with errors.
Done(1)

as for my libraries:

actuate: 1.8.6 [1.8.7]
assetsmanager: [1.2.0]
box2d: [1.2.3]
cereal: [0.0.4]
format: [3.2.1]
haxeui-file-dialogs: [0.1.1]
haxeui: 1.7.18 1.8.17 [1.8.20]
hscript: 2.0.4 2.0.5 [2.0.7]
hxcpp: 3.2.180 3.2.205 [3.3.49]
layout: [1.2.1]
lime-samples: [2.6.0]
lime: 2.8.1 2.9.0 2.9.1 3.0.0 3.0.2 [3.0.3]
mlib: [2.0.2]
msignal: 1.2.2 [1.2.4]
openfl-samples: 3.3.1 [4.0.0]
openfl: 3.6.0 3.6.1 4.0.0 4.0.2 [4.0.3]
rox-i18n: [1.0.0]
stablexui: [1.1.5]
svg: 1.0.8 [1.0.9]
swf: 2.1.0 2.1.3 2.2.0 2.2.1 [2.2.3]
systools: [1.1.0]
tjson: [1.4.0]

I have tried to build NyanCat, it worked, but kindly notice that my project complied successfully (with openfl 3.6.1 )before upgrading openfl to version 4

I am not using new SWF, and I have haxe 3.2.1
using -verbose to compile, check this [gist] (https://gist.github.com/hopewise/a34828a7d668c7efce5bbd3fcaf18ef2) for full details.

Kindly advice

Trying to run some code for embedding a video to see if I can play it seamlessly and getting problems also.

From here Showing videos in OpenFl

line that triggers it is :slight_smile:
// using appendByte, you can play a video embeded as an asset
ns.appendBytes();

src/i/m/a/Main.hx:56: characters 16-32 : Not enough arguments, expected bytes:openfl.utils.ByteArray
Build halted with errors.
Done(1)
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field addRenderer needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field addWindow needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field registerModule needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field removeRenderer needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field removeWindow needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field setPreloader needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field unregisterModule needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field addRenderer needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field addWindow needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field registerModule needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field removeRenderer needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field removeWindow needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field setPreloader needed by lime.app.IModule is missing
C:\HaxeToolkit\haxe\lib\openfl/3,6,1/extern/openfl/display/Stage.hx:135: lines 135-630 : Field unregisterModule needed by lime.app.IModule is missing

May just not be related but found this really odd.

Are you using new format.SWF directly? That will break on the Flash target

I am using methods like:

var clip = Assets.getMovieClip ("swf-library:MySymbolClass");

and

var clip = new MySymbolClass ();
p.s: does this what you mean by using `new format.SWF` directly? 

I include swfs as:

<library path="assets/led.swf" preload="true" generate="true"/>
<library path="assets/library.swf" preload="true" generate="true"/>

What happens if you set type="swflite" on your <library /> tags?

kindly check result here

Is there any update? I am trying to compile, but with openFL 3.6.1, I think I will be fine there, although I am away behind :pensive:

The question is, what lime/swf version is compatible with openfl 3.6.1?
I tried lime 2.9.1, and lime 3.0.0, but I got the same error:

Error: load.c(357) : Primitive not found : lime@lime_zlib_decompress(1)

SWFLite works here with the latest everything – I don’t know why format.swf.utils.BitArray is getting imported in your project. I just made some fixes to help allow Flash to compile in case this is accidentally imported, but the format.swf classes are not intended for use on Flash

https://github.com/openfl/swf/commit/d69c140cd003e7e041bf4cfcf6a90ac0f6e7299d

Thanks for clarification, the fix has worked :slight_smile: , now I have to deal with openfl.display.Tilesheet is there a way to include this class in openFL 4 ? maybe external library?

You can move from Tilesheet to Tileset easily, but replacing drawTiles would require someone to port code to an OpenGLView or equivalent class.