views:

25

answers:

0

Hi, people! I'm new in AS and trying create util such Youtube's "My webcam". Here's a part of my code:

var camera:Camera = Camera.getCamera(cameraIndex.toString());
VideoDisplay.attachCamera(camera); //view yourself
var mic:Microphone = Microphone.getMicrophone(0);

video = new Video();
netconnection = new NetConnection;
netconnection.connect(null);

netstream = new NetStream(netconnection);
netstream.attachAudio(mic);
netstream.attachCamera(camera);

video.attachNetStream(netstream); //store video

Can't attach video object or stream to spark.components.VideoPlayer to view video and don't know how to convert video to flv contents for sending in POST form.

Any thoughts? Thanks a lot!