title: "flash" is not defined in AS3?
body: <p>I'm using the regular <code>flash.utils.Dictionary</code> for a dictionary of source objects, and a custom implementation <code>flos.utils.Dictionary</code> that has extended functionality like retrieving the length of the dictionary and automatically removing keys when their value is set to undefined.</p>
  
  <p>I'm getting these errors during compilation:</p>
  
  <ul>
  <li>"1046: Type was not found or was not a compile-time constant: Dictionary."</li>
  <li>"1120: Access of undefined property flash."</li>
  <li>"1120: Access of undefined property flash."</li>
  </ul>
  
  <p>Those three errors are occurring for each of the private variables declared in the code below.  I'm importing my custom dictionary, so I'm using the fully-qualified name when targeting the built-in dictionary <code>flash.utils.Dictionary</code>, but it seems to think that the <code>flash</code> namespace is undefined.</p>
  
  <pre><code>package flos.system.binding 
  {
      import flos.utils.Dictionary;
  
      internal class BindingDictionary
      {
          private var targetBindings:flash.utils.Dictionary = new flash.utils.Dictionary(); //Dictionary of targets, containing dictionaries of bound target properties, containing the source/propertyName pair that the target is bound to.
          private var sourceBindings:flash.utils.Dictionary = new flash.utils.Dictionary(); //Dictionary of sources, containing Dictionaries of bound source properties, containing Binding instances that determine which targets/properties the source property is bound to.
  
          public function BindingDictionary()
          {
          }
  </code></pre>
  
  <p>FYI, this internal class used to be a private class declared in the same file as a Bindings class, outside the package at the bottom of the file.  I was getting a runtime error #1007 "Instantiation attempted on a non-constructor. at Binding$iinit()", when I tried to call a static member of the Binding class.  All the classes had constructors and I could not figure out what was wrong, so I moved the classes into separate files, and that's when I ran into these compilation errors instead.</p>