Input components through classes

Hi I’m having some difficulity access information from the components through the class file. Its a simple form with 1 text box and 1 button. Upon pressing submit I want to be able to retrieve whatever the users types??
Here is what I have


class Product {
 
 var id:Number;
 var prodName:String;
 var description:String;
 
 function Product (id:Number) {
  getID(id);
}
 public function getId () :Number
{                
             var userid = id;
             trace("your input it:"+ id.toString());
                  return id;
         }
}

On the button which accesses this file I have.


on(click){
 var getProducts:Product= Product;
 getProducts.Product();
}