      */
     public function setMode (width :int, height :int, fps :Number, favorArea :Boolean = true) :void
     {
+        clearSnapshot();
+        removeChild(_video);
         _camera.setMode(width, height, fps, favorArea);
-        _video.width = _camera.width;
-        _video.height = _camera.height;
+        attachVideo();
     }
 
     public function takeSnapshot () :void

            return;
        }

        _video = new Video(_camera.width, _camera.height);
        _bitmap = new Bitmap(new BitmapData(_camera.width, _camera.height, false));
        _video.attachCamera(_camera);
        addChild(_video);
    }

    public function getCameraName () :String

            return; // throw exception?
        }

        // for some reason the video seems to always be locked at 160x120 when we try to
        // draw it, so we do some scaling...
        var matrix :Matrix = new Matrix(_camera.width / 160, 0, 0, _camera.height / 120);
        _bitmap.bitmapData.draw(_video, matrix);

        if (_video.parent != null) {
            removeChild(_video);
            addChild(_bitmap);
