title: Change Variable on Mouse Event
body: <p>I'm trying to change the variable that's set to 0 into 1 on a mouse event.
  I have 3 movie clips 'maskedbgmc' and when clicked its supposed to change a variable.
  But it doesn't change the variable as far as i can see. What do i miss?</p>
  
  <p>Thanks for your time :)</p>
  
  <pre><code>var checkCard1:Number = 0;
  
  maskedbg_mc.addEventListener(MouseEvent.MOUSE_DOWN, cardChecked1);
  function cardChecked1 (event:MouseEvent):void {
      checkCard1 = 1;
  }
  
  var checkCard2:Number = 0;
  
  maskedbg_mc2.addEventListener(MouseEvent.MOUSE_DOWN, cardChecked2);
  function cardChecked2 (event:MouseEvent):void {
      checkCard2 = 1;
  }
  
  var checkCard3:Number = 0;
  
  maskedbg_mc3.addEventListener(MouseEvent.MOUSE_DOWN, cardChecked3);
  function cardChecked3 (event:MouseEvent):void {
      checkCard3 = 1;
  }
  
  if(checkCard1 == 1) {
    trace('Nice!');
  }
  else if(checkCard2 == 1) {
    trace('Better!');
  }
  else if(checkCard3 == 1) {
    trace('King!');
  }
  </code></pre>