Flash 中的相机流问题

发布于 2024-10-09 20:05:30 字数 472 浏览 5 评论 0原文

请帮我填写问号。我想从相机获取反馈并将其传递给接收函数。另外,在 Flash 生成器(在设计模式下)中,我如何放置元素以便它们可以播放相机源?因为看起来 VideoDisplay 不起作用

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

}

private function send():void{

var mycam:Camera = Camera.getCamera();
//mycam2.attachCamera(mycam);
//sendstr is a stream we send           
sendstr.attachCamera(mycam);
//we pass mycam into receive
sendstr.send("receive",mycam);
}

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(mycam);
//sendstr is a stream we send           
sendstr.attachCamera(mycam);
//we pass mycam into receive
sendstr.send("receive",mycam);
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪痕残 2024-10-16 20:05:30
    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...
    }
    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...
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文