When i try to do this “if(messageBytes.length>255 && messageBytes !=4)” i get the compile error complaining about array access not allowed.
Is this not possible in haxe/openfl? Do i need to do something like change the position and use the read methods?
For now you can access ByteArray with __get() on non-Flash targets, or any other methods available in ByteArray class. It would be better to create inline utility function that allows you to access ByteArray, if you need Flash target.
I hope this to be fixed in future release.
Open to ideas, the other workaround is setting the position then using readByte