title: External Config file in Actionscript 3
body: <p>I need to be able to load external configuration files into my flex app. I've read that this is possible using embeds, so long as the mimeType is set to application/octet-stream.</p>
  
  <pre><code>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();
          }
      }
  }
  </code></pre>
  
  <p>When I compile this using <code>mxmlc</code>, it compiles successfully with no errors. When I run the SWF, it loads all the Flixel menus then hangs.</p>
  
  <p>If I comment out the <code>[Embed(source = '../../data/map.txt'</code> line, it compiles and doesn't hang.</p>
  
  <p>Why is this embed causing a freeze? </p>
  
  <p>Version info for mxmlc:</p>
  
  <pre><code>Adobe Flex Compiler (mxmlc)
  Version 4.0.0 build 14159
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>It turns out errors weren't being displayed properly, but this is what I'm getting from attempting the embed:</p>
  
  <p><code>VerifyError: Error #1014: Class mx.core::ByteArrayAsset could not be found.</code></p>
  
  <p>Google turns up a bunch of people with the same problem, but no apparent solution.</p>
  
  <p><code>import mx.core.ByteArrayAsset; ByteArrayAsset</code></p>
  
  <p>doesn't help either.</p>