# Keeping track of 4 button presses

**URL:** <https://forum.kirupa.com/t/keeping-track-of-4-button-presses/279475>\
**Category:** flash\
**Created:** [January 15, 2009, 2:42am UTC](https://forum.kirupa.com/t/keeping-track-of-4-button-presses/279475 "2009-01-15T02:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designerdan](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@designerdan](https://forum.kirupa.com/u/designerdan)\
**Post date:** [January 15, 2009, 2:42am UTC](https://forum.kirupa.com/t/keeping-track-of-4-button-presses/279475/1 "2009-01-15T02:42:30Z")

</div>

I’m attempting to create a few [COLOR=Blue]very[/COLOR] simple flash games, but I haven’t been able to figure out the coding.

What I am attempting is to have 4 buttons each activated on a different keypress. Each time a user presses one of the keys, a specific animation is triggered, showing that the key was pressed. What I need to know is- how do I have flash trigger a final animation when all four keys have been pressed?

My Rube Goldberg idea: I tried making a set of dynamic text boxes that would change text, one for each button. I figured flash could run a simple string check (like in the basic password tutorial here) and if they all proved true it could goto and play the next scene or another MC. BUT- It seems to only check at the beginning of the movie, and if I attached it to onEnterFrame, Flash would have a cow about my syntax!

Any ideas? It must be pretty simple- but it requires more finesse than I have.

In short: 4 buttons, each triggers an MC, after pressing all four individually, go to next scene.

Thanks!
