A little number action

This seems like such a simple task but I seem to be going about it wrong. I want to be able to toggle on and off different movieclips in a scene by pressing an assigned key number (on the keyboard and number pad) like: 1 would make movieclip1 start and stop, 2 would make movieclip2 start and stop, etc. I got it to work with the spacebar but with that, I can’t target specific movieclips. Tried different scenarios with key listener events but I must have missed a step. Also, would this be an actionscript that’s attached to each individual movieclip itself or something that must take place on the main timeline? Any ideas? Thanks for your wisdom!