1 LED, multiple inputs

Then lets say that I'm not putting these on my car, but instead, using it for Halloween special effects when someone steps on a switch walking into the room.
How could I make the LED strobe 2 times then go on solid until the switch is released?