title: AS3 'with' and 'removeChild' syntax
body: <p>With the following code..</p>
  
  <pre><code>var testContainer = new Sprite();
  addChild(testContainer);
  
  var testSprite = new Sprite();
  testSprite.name = "sim":
  testContainer.addChild(testSprite);
  </code></pre>
  
  <p>I'm a little confused as to why the following call returns a child-null error:</p>
  
  <pre><code>testContainer.removeChild(getChildByName("sim"));
  </code></pre>
  
  <p>Yet the following code does not, and in fact works exactly as intended:</p>
  
  <pre><code>with(testContainer)
  {
    removeChild(getChildByName("sim"));
  }
  </code></pre>
  
  <p>Can anyone shed any light on this as I assumed when you're not casting a reference using <code>with</code> it simply prefixes any function calls you supply it.</p>