1 LED, multiple inputs

In continuation to my original post, how can I get the LED to strobe on and off 3 times before going to a solid state then wait for the button to be released before going back to the off state?