title: Flex: type was not found or was not a compile-time constant: Button
body: <p>I am trying to build a pure as3 project in flex and I got the following error:</p>
  
  <pre><code>type was not found or was not a compile-time constant: Button
  
  type was not found or was not a compile-time constant: TextField
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>    import fl.controls.TextInput;  // import my textinput
  
  import flash.display.Shape;
  import flash.display.SimpleButton;
  import flash.display.Sprite;
  import flash.text.TextField;
  import fl.controls.Button;   //import my button
  
  
  public class SearchYoutube extends Sprite
  {
      private var textBx:TextField=new TextField();
      private var controls:Controls;
      private var bground:Sprite=new Sprite();
      private var searchButton:Button;
  
  /************************Constructor*********************/
          public function SearchYoutube()
          {
          /*********************Create Search Form****************************/
              createSearchForm("Please Enter Your Keyword");
  
          }
  
  
  
      /*********************Search Form****************************/
      private function createSearchForm(title:String):void{
  
          var searchInput:TextInput = new TextInput();  //error here
          searchInput.width = 200;
          searchInput.x=150;
          searchInput.y=450;
          searchKeyword=searchInput.text;
          addChild(searchInput);
  
          searchButton = new Button();   //error here
          searchButton.x = 380;
          searchButton.y = 450;
          searchButton.label = "Search";
          addChild(searchButton);
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I appreciate any helps!</p>