title: Removing Sprites from stage
body: <p>Hey guys, got a problem with my pages in flash. So i created 5 pages, each of which contains several movie clips (text, graphics, forms, etc). There is one specific page however that contains autogenerated content via. sprites. If i happen to land on this page, the sprites will appear, but when i transition to another page, they are still there except for the non-sprite stuff (disappear). Im ripping my hair out on this one, i managed to get a few of the sprites to remove but some are still appearing. Below shows the layout of the one thats not being removed;</p>
  
  <pre><code>var container:Sprite = new Sprite();
  
  //loop places several "item" in this container sprite and a scroll bar
  var item:myItem = new myItem();
  var sb:customScrollBar = new customScrollBar();
  
  container.addChild(item);
  container.addChild(sb);
  </code></pre>
  
  <p>So we are now on this page where container and items are generated, i then click a button to move to say the home page and the container still stays there. </p>
  
  <p>Here is what i tried:</p>
  
  <pre><code>removeChild(container); //nothing, this was called from another keyframe where the container was not generated from
  stage.removeChild(container); //nothing
  </code></pre>
  
  <p>Here are the errors.
  ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.</p>
  
  <p>Note*
  I also have several buttons that were also generated NOT inside the container like below and they worked when i ran removeChild(button1) so i dont know why the container one is not working.</p>
  
  <p>FLA (cs4)
  <a href="http://www.4shared.com/file/2swJjnNm/mevame.html" rel="nofollow noreferrer">http://www.4shared.com/file/2swJjnNm/mevame.html</a></p>
  
  <p>Preview
  <a href="http://bodog-bonuses.com/mevame/" rel="nofollow noreferrer">http://bodog-bonuses.com/mevame/</a></p>