MC attack

How do you make a MC like shoot a gun or something when you press the spacebar?:puzzled:

http://www.kirupa.com/developer/mx/fire.htm