OpenFl ByteArray File Loading Problem

62 views
Skip to first unread message

Shareef Raheem

unread,
Nov 5, 2014, 7:08:40 PM11/5/14
to haxe...@googlegroups.com
I need to open a custom file format that is outputted from an as3 air program. Whenever I use 
var bytes:ByteArray = openfl.Assets.getBytes("mapData/TestMap.vktk");
the data is loaded but how do I use it. In as3 I'm using the FileReference Class.
The program crashes when i use any ByteArray method EX:
var mapName = bytes.readUTF();

Invalid operation (<<)
Called from openfl/utils/ByteArray.hx line 403
Called from openfl/utils/ByteArray.hx line 410
Called from Main.hx line 80
Called from Main.hx line 21
Called from Main.hx line 390
Called from E:\SDKs\HaxeToolkit\haxe\std/neko/_std/Reflect.hx line 58
Called from ApplicationMain.hx line 91
Called from openfl/Lib.hx line 113

Thats the error I get in FlashDevelop.

Thanks in advance if you guys can help me(I've been trying to get this to work for a few days).

PS: If you need more info I can give it to you.
Reply all
Reply to author
Forward
0 new messages