Need help debugging

var listenerObj:Object = new Object();
//the following two variables contain the date information used to 
//get the system info on the date
var studyPeriodBegin:Date = new Date();
var studyPeriodEnd:Date = new Date();
//this is the vairable the text box under the words "monitoring period"
//checks for
var studyPeriod:String = "";
var postLCount:Number = 0;
var postRCount:Number = 0;
var antLCount:Number = 0;
var antRCount:Number = 0;
var leftCorrect:Number = 0;
var rightCorrect:Number = 0;
var postL:Boolean = true;
var antL:Boolean = true;
var postR:Boolean = true;
var antR:Boolean = true;
var leftHeel:Boolean = false;
var rightHeel:Boolean = false;
var incL:Boolean = true;
var incR:Boolean = true;
//a couple of button names to be used in creating start and stop triggers for
//the application. May require a boolean to indicate whether or not the 
//start trigger in on.
var start_bt:Button;
var stop_bt:Button;
var incBarL:MovieClip;
var incBarR:MovieClip;
var corBarL:MovieClip;
var corBarR:MovieClip;
var a:MovieClip;
var s:MovieClip;
var q:MovieClip;
var w:MovieClip;
//stops the lights from going on right away
a.gotoAndStop(1);
s.gotoAndStop(1);
q.gotoAndStop(1);
w.gotoAndStop(1);
//left over from having multiple step indicator lights
/*var a1:MovieClip;
var s1:MovieClip;
var q1:MovieClip;
var w1:MovieClip;
var a2:MovieClip;
var s2:MovieClip;
var q2:MovieClip;
var w2:MovieClip;
var a3:MovieClip;
var q3:MovieClip;
a1.gotoAndStop(1);
s1.gotoAndStop(1);
q1.gotoAndStop(1);
w1.gotoAndStop(1);
a2.gotoAndStop(1);
s2.gotoAndStop(1);
q2.gotoAndStop(1);
w2.gotoAndStop(1);
a3.gotoAndStop(1);
q3.gotoAndStop(1);*/
//sets the bar grapsh to be zero
corBarL._yscale = 0;
corBarR._yscale = 0;
incBarL._yscale = 0;
incBarR._yscale = 0;
//makes an object called "listenerObj" listen for onKeyDown. When it hears
//a key pressed it sets the object's function to switch()
listenerObj.onKeyDown = function() {
 //in the switch() parentheses we tell it what to look for, in this 
 //instance we want it to look for a string that comes from the 
 //character code incoming from the key controller. 
 switch (String.fromCharCode(Key.getCode())) {
 //now we tell it about the "case" we want it to look for, in this instance
 //if the switch() sees the letter "A", it should execute the following
 //statements.
 case "A" :
 // this sets up a conditional that depends on the value of the key code
 //being 65 and a boolean test returning the value of true. I did this 
 //to defeat the automatic repeat of the keyDown signal from the keyboard.
  if (Key.getCode() == 65 && postL == true) {
   //this adds one to the counter
   postLCount += 1;
   //this should display the new light
   a.gotoAndPlay(1);
   trace("you pressed postL");
   trace(postLCount);
   //the function that depends on the postL boolean being true now 
   //shuts the door behind it by setting the value to false.
   postL = false;
   leftHeel = true;
  }
  //this ends the case for "A", so remember that if the conditional
  //didn't get an "A" press it will go straight to this line, which
  //checks the next case for a statement about what to do. Now we repeat.
  break;
 case "S" :
  if (Key.getCode() == 83 && antL == true) {
   trace("you pressed antL");
   antLCount += 1;
   s.gotoAndPlay(1);
   trace(antLCount);
   antL = false;
   incL = true;
  }
  //knowing that antL is now false, we add a new if statement that 
  //looks for whether or not leftHeel is true to determine if it should 
  //add one to the value of leftCorrect, make the bar longer, and reset.
  if (antL == false && leftHeel == true) {
   leftCorrect +=1;
   incL = false;
   corBarL._yscale += 2;
   leftHeel = false;
   }
  //makes sure you don't get an incorrect score if the toe is pressed
  //repeatedly while the heel is still down. However, at the moment it's
  //having problems with sequencing. That is, if you hold down one button
  //then hold down another and release the first one, the first one won't
  //read a new press.
  if (incL == true && antL == false) {
   incBarL._yscale += 1;
   }
  break;
 case "Q" :
  if (Key.getCode() == 81 && postR == true) {
   trace("you pressed postR");
   postRCount += 1;
   q.gotoAndPlay(1);
   trace(postRCount);
   postR = false;
   rightHeel = true;
   incR = false
  } 
 case "W" :
  if (Key.getCode() == 87 && antR == true) {
   trace("you pressed antR");
   antRCount += 1;
   w.gotoAndPlay(1);
   trace(antRCount);
   antR = false;
   incR = true
  }
  if (antR == false && rightHeel == true) {
   rightCorrect += 1;
   incR = false;
   corBarR._yscale += 2;
   rightHeel = false;
  }
  if (incR == true && antR == false) {
   incBarR._yscale += 1;
   }
  break;
  //you always need a default case for the switch, in case its 
  //initiating circumstace occurs, but none of the cases turn out
  //to be "true".
 default :
  trace("you pressed some other key");
  break;
   
 }
};
//this is the same architecture as the code above, but it opens the door,
//so to speak, for another true value to allow the if statements above to pass.
listenerObj.onKeyUp = function() {
 switch (String.fromCharCode(Key.getCode())) {
 case "A" :
  postL = true;
  a.gotoAndStop(1);
  break; 
 case "S" :
  antL = true;
  s.gotoAndStop(1);
  break;
 case "Q" :
  postR = true;
  q.gotoAndStop(1);
  break; 
 case "W" :
  antR = true;
  w.gotoAndStop(1);
  break; 
 default :
  trace("you pressed some other key");
  break;
   
   
 }
};
Key.addListener(listenerObj);
//this part is supposed to make the individual light indicators go on and stay on
//when the switch is closed, then off when the switch is open. If you think
//you can figue out a way to achieve this by using the switches above, go 
//for it. Remeber that there are only four indicators in total now.
//The problem I've been having is that if you close one switch
//and then another, the first one stays on until you press the other one again.
/*
this.onEnterFrame = function() {
 if (Key.isDown(65)) {
  a.gotoAndPlay(1);
  a1.gotoAndPlay(1);
  a2.gotoAndPlay(1);
  a3.gotoAndPlay(1);
 } else {
  a.gotoAndStop(1);
  a1.gotoAndStop(1);
  a2.gotoAndStop(1);
  a3.gotoAndStop(1);
 }
 if (Key.isDown(83)) {
  s.gotoAndPlay(1);
  s1.gotoAndPlay(1);
  s2.gotoAndPlay(1);
 } else {
  s.gotoAndStop(1);
  s1.gotoAndStop(1);
  s2.gotoAndStop(1);
 }
 if (Key.isDown(81)) {
  w.gotoAndPlay(1);
  w1.gotoAndPlay(1);
  w2.gotoAndPlay(1);
 } else {
  w.gotoAndStop(1);
  w1.gotoAndStop(1);
  w2.gotoAndStop(1);
 }
 if (Key.isDown(87)) {
  q.gotoAndPlay(1);
  q1.gotoAndPlay(1);
  q2.gotoAndPlay(1);
  q3.gotoAndPlay(1);
 } else {
  q.gotoAndStop(1);
  q1.gotoAndStop(1);
  q2.gotoAndStop(1);
  q3.gotoAndStop(1);
 }
};*/

The project is to count the amount of correct steps a person takes
on a rehibilitative shoe that has sensors in the heel and toe
and output letters “a” and “s” for the left foot
“q” and “w” for the right foot.

The problem is that, a correct step is when “a” and then “s” is pressed,
but after one step the key that was pressed first, stays lit up. and cannot count another
correct step until the first part is unlit by pressing the letter again.

I guess its a sequencing issue?

some help would be great, thanks