Sunday, March 14, 2010
Simple Camera Capturing using Action script 3
package
{
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.display.*;
public class SimpleCamera extends MovieClip
{
private var camera:Camera;
private var mic:Microphone;
public function SimpleCamera()
{
ok.addEventListener(MouseEvent.CLICK,Play);
ok2.addEventListener(MouseEvent.CLICK,Stop);
}
public function Play(event:MouseEvent)
{
camera = Camera.getCamera();
mic = Microphone.getMicrophone();
videoCamera.attachCamera(camera);
}
public function Stop(event:MouseEvent)
{
videoCamera.attachCamera(null);
}
private function activityHandler(event:ActivityEvent):void {
trace("activityHandler: " + event);
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment