Timing in Flash

Can someone please analyze this fla to try and determine where I’m going wrong? What I would like to do is have the playhead loop between frames until I hit the spacebar, in which case it would advance to the next set of frames and then loop appropriately. I am also using a timer piece of code to dictate how long the playhead stays on one frame. This code and and the one I’m using for the key press seem to be conflicting…

Thanks in advance…