title: programmatically add views to a viewstack flex
body: <p>I'm trying to figure out how to in as3 (not mxml) add views to a view stack.</p>
  
  <p>For example I have a view component like so</p>
  
  <pre><code>package components.screens
  {
      import mx.controls.Label;
      import mx.core.UIComponent;
  
      public class HomeScreen extends UIComponent
      {
          private var l:Label=new Label()
  
          public function HomeScreen()
          {
              super();
  
              l.text="home";
  
              addChild(l)
          }
  
      }
  }
  </code></pre>
  
  <p>I've being trying to add it to a viewstack in the following way</p>
  
  <pre><code>var myStack:ViewStack= new ViewStack();
  
  mystack.addChild(homeScreen)
  </code></pre>
  
  <p>This does not work. Whats the correct way?</p>
  
  <p>I'm aware I have to assign ID's but for now I just want to get the view in there</p>