lately the built-in camera on my macbook pro hasn't been working properly: at first it works normally then after a while it stops (the green light stays on) and when I open photo booth or other programmes it says "camera not connected", how can I fix this?
open a terminal and type
sudo killall VDCAssistant
This totally fixed my issue. Thanks!
One of these will fix your problem:
(1) If restarting your Mac doesn't fix the problem,
(2) use Apple's http://support.apple.com/kb/HT2090.
(BTW - Apple has changed the built-in camera's name on newer Macs from "iSight" to "FaceTime" and then to "FaceTime HD." Regardless of the name of your built-in camera, the same info and troubleshooting applies.)
Be sure to test more than one Apple app in more than one user account. Do NOT use the "Guest" account for this test. If you do not have more than one user account for the testing, create a new one now. If you need help, here's how to do it in your Mac OS: http://support.apple.com/kb/PH11468 (A "Standard" account is all you need for testing.)
(3) If your cam still does not work properly, use Disk Utility to repair permissions. Then download and apply the latest Combo Update for your OS. Currently, the latest ML Combo is here: http://support.apple.com/kb/DL1571
Repair permissions again immediately following the system restart that completes the update.
(4) The only other action I know that you can do on your own is to use OS X Recovery to completely reinstall your Mac OS.
(5) If none of the above suggestions resolve your trouble, contact Apple or an Apple-Authorized Service Provider to have your Mac professionally serviced.