How to Stop Recording Microphone/Camera

Does anyone know how to stop capturing input from the Microphone/Camera? I’ve got recording successfully to an FMS, but I don’t know how to release the webcam/microphone after I’m done with it, without reloading the SWF. Any ideas?