views:

500

answers:

3

I have a flash application that connects to a users webcam using

public static function getCamera(name:String = null):Camera

When the application is done with the use of the webcam it needs to be disconnected since its making use of resources unnecessarily.How can I do this?

Apologies for being a "micro-efficiency" freak. I am not even sure how inefficient it is, but I don't like the idea of the camera being just connected when not used.

I have checked the API and have found no function to do that.

Thank you for any help.

+2  A: 

Call on you NetStream:

attachCamera(null);
Hippo
A: 

I tried this, but the light of my iSight Camera is still on. Is there another solution for disconnecting the webcam?

Kimi
A: 

I found the solution here: http://stackoverflow.com/questions/1483277/close-webcam-usage-via-actionscript

also remove the cam from the video display by attaching null to the display. video.attachCamera(cam);

Kimi