Connect Camera is easy, turn it off is evil!!

To turn it on is so simple as document said but to turn it off after access need specific method. After google around I found this one solution:

video.attachCamera(null);
video.clear();
removeChild(_video);
camera = null;

ref: http://www.ninjabonsai.net/blog/?p=80

I test in an empty fla and it work like a charm. But when I test in my working project which do a lot more of connect and display video. I found that another important trick to do is below:

var cam:Camera = Camera.getCamera( id );
video.attachCamera(null);  // this need to set before the next line, always.
video.attachCamera(cam);

I know it weird but it work well for me.