Accessing ByteArrays with array access operator is not possible on JavaScript target for now.
It used to generate array access expression silently on JavaScript target even though it didn’t work. I thought that it just makes finding errors difficult, so I disabled it in this commit and sent pull request.
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.
Yeah, there were getter/setter methods that I thought worked across multiple platforms, until I realized that it was C++ only. We need to extend either a native data type in JavaScript that supports array access (like an array or typed array) or be a Haxe abstract, but I don’t think that ByteArray is a good idea to be abstract, because you could not Std.is on it, etc.
Open to ideas, the other workaround is setting the position then using readByte