First off, the simple camera connection statement. This works locally without FCS. It is built into Flash MX.
Place this action script in frame one and open the library palette. In the library, create a new video symbol. drag the symbol onto the main stage (this empty symbol with have an x and a box). Name the instance of this empty video symbol "MyVideo" in your properties panel. Run your movie and watch your web camera.
Here's the first example running. If you have a web camera installed you will see the web camera's video below.
Here's an example of connecting and publishing your web camera via RTMP in Flash Communications Server. Since this example uses absolute paths, You can run this swf from any webpage. The end result is an flv file connected to the server. Readers are expected to have an FCS acount with metasphere.net. Those without should ignore the ip address specified.
/// this is the connection script.
///You can run this script as a seperate flash file
///connection = new NetConnection();
subscribeStream = new NetStream(connection);
// myVid is a Video object on the Stage