开发者

Camera Stream in Flash Problem

开发者 https://www.devze.com 2023-02-01 12:48 出处:网络
Please help me fill the question marks. I want to get a feed from my camera and to pass it to the receive function. Also in flash builder(in design mode) how do I put elements so they can play a camer

Please help me fill the question marks. I want to get a feed from my camera and to pass it to the receive function. Also in flash builder(in design mode) how do I put elements so they can play a camera feed?? Because as it seems VideoDisplay just doesn't work

public function receive(???:???):void{
//othercam is a graphic element(VideoDisplay)   
othercam.??? = ????;

}

private function send():void{

var mycam:Camera = Camera.getCamera();
//mycam2.attachCamera(开发者_如何学Gomycam);
//sendstr is a stream we send           
sendstr.attachCamera(mycam);
//we pass mycam into receive
sendstr.send("receive",mycam);
}


    public function receive():void
   {
    video = new Video(put-width-here, put-height-here);
    video.attachCamera(mycam); // mycam needs to be a class variable, not local to "send()";

    mybitmap = new BitmapData(fill parameters here);
    update();

    }

    public function update() {
    mybitmap.draw(video);
    // do stuff to your bitmap here...
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号