I need to be able to load external configuration files into my flex application. I read that this is possible using tabs while mimeType is set to application / octet-stream.
package learning {
import org.flixel.*;
public class PlayState extends FlxState {
[Embed(source = "../../data/tiles.png")] private var _tiles:Class;
[Embed(source = '../../data/map.txt', mimeType = "application/octet-stream")] private var ExternalMapData:Class;
public var txt:FlxText;
public var player:FlxSprite;
override public function create():void {
bgColor = 0xffaaaaaa;
super.create();
}
override public function update():void {
super.update();
}
}
}
When I compile this with mxmlc, it compiles successfully without errors. When I run SWF, it loads all the Flixel menus and then freezes.
If I comment out a line [Embed(source = '../../data/map.txt', it compiles and does not hang.
Why does this embed cause freezing?
Version Information for mxmlc:
Adobe Flex Compiler (mxmlc)
Version 4.0.0 build 14159
EDIT
It turns out that the errors do not display properly, but this is what I get from the embed attempt:
VerifyError: Error #1014: Class mx.core::ByteArrayAsset could not be found.
A bunch of people appear on Google with the same problem, but without a visible solution.
import mx.core.ByteArrayAsset; ByteArrayAsset
doesn't help either.