Lag increases over time when using multiple event listeners

I am working on a project that uses a grid. Each tile of the grid gets assigned the same three eventListeners:

indexStart = 0;
                while (indexStart < 100) {
                    if ( Computer.getChildByName("newAttackTile" + indexStart.toString()).alpha != 0) {
                        Computer.getChildByName("newAttackTile" + indexStart.toString()).addEventListener(MouseEvent.CLICK, submitAttack, false, 0, true);
                        Computer.getChildByName("newAttackTile" + indexStart.toString()).addEventListener(MouseEvent.ROLL_OVER, onMouseOver, false, 0, true);
                        Computer.getChildByName("newAttackTile" + indexStart.toString()).addEventListener(MouseEvent.ROLL_OUT, onMouseOut, false, 0, true);
                    }
                    indexStart++;
                }

So as I click on the tiles there is a pause between the click and the actual firing of the function. This pause is insignificant during the first few clicks, but eventually the delay builds up to the point where the program experiences a lag of up to 3 seconds and increasing. Everything is frozen during this time.

When the listeners fires it does some updating but it then removes the eventListeners:


evt.currentTarget.highlight.alpha = 0;
                    evt.currentTarget.highlight.grid.alpha = .5;
                    evt.currentTarget.removeEventListener(MouseEvent.CLICK, submitAttack);
                    evt.currentTarget.removeEventListener(MouseEvent.ROLL_OVER, onMouseOver);
                    evt.currentTarget.removeEventListener(MouseEvent.ROLL_OUT, onMouseOut);
                    evt.currentTarget.buttonMode = false;

then it calls another function to do some more updating…

When I noticed the lag build up I tried to add to add to this function a removal of all event listeners on the grid, followed by another calling of the function above to re-instantiate the listeners. This did not correct the issue.

I then went through all my code looking for any variables that might be getting re-declared, every time the functions were being called, and removed them. I tried removing the loop codes that add and remove listeners each time; still no change.

So right now I am kind of at a loss for what do do. I placed trace statements through out my entire code and the lag definitely seems to be increasing between the actually click action and the eventListener firing its functions, the functions that fire after the eventListeners happen at virtually the same time so I assume it isn’t my code but how I am implementing the listeners on the grid. Any help would be appreciated.

Thanks.