title: Getting this error on AS3 .TypeError: Error #1006: value is not a function.
body: <p>Getting this error on AS3. TypeError: Error #1006: value is not a function. I'm new and cant understand why this error is occurring. Any help is greatly appreciated.</p>
  
  <pre><code> var wallet = false;
  var bag = false;
  var lunch = false;
   wallet.addEventListener(MouseEvent.CLICK, walletClick);
      lunch.addEventListener(MouseEvent.CLICK, lunchClick);
      bag.addEventListener(MouseEvent.CLICK, bagClick);
      function walletClick(event:MouseEvent)
      {
  
      if (wallet == true)
      {
          trace("You Already found your Wallet,look Elsewhere");
          TextBox.text ="You Already found your Wallet,look Elsewhere";
      }
       else 
      {
          trace("You found your Wallet");
           wallet = true;
          TextBox.text = "You found your Wallet";
      }
      }
  
      function lunchClick(event:MouseEvent)
      {
         if  (lunch == true)
      {
          trace("You Already found your Lunch Box,look Elsewhere");
          TextBox.text ="You Already found your Lunch Box,look Elsewhere";
      }
       else
      {
          trace("You found your Lunch Box");
          lunch = true;
          TextBox.text = "You found your Lunch Box";
      }
      }
  
  
  
      function bagClick(event:MouseEvent)
      {
          if  (bag == true)
      {
          trace("You Already found your bag,look Elsewhere");
          TextBox.text ="You Already found your bag,look Elsewhere";
      }
       else
      {
          trace("You found your bag under the Table");   
          bag = true;
          TextBox.text = "You found your bag under the Table";
      }
      }
  </code></pre>
  
  <p>Getting this error on AS3. TypeError: Error #1006: value is not a function. I'm new and cant understand why this error is occurring. Any help is greatly appreciated.</p>