2010-12-30 4 views
0

Aidez-moi à remplir les points d'interrogation. Je veux obtenir un flux de mon appareil photo et le passer à la fonction de réception. Aussi en Flash Builder (en mode design) comment puis-je mettre des éléments afin qu'ils puissent jouer un flux de caméra? Parce qu'il semble VideoDisplay ne fonctionne tout simplement pasCaméra en Flash Problème

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); 
} 

Répondre

0
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... 
    }