0 Replies Latest reply on Jun 7, 2007 4:29 AM by chrisatflash

    Zoom in Video?

    chrisatflash Level 1
      Hello,
      I have this webcam and i want to make a zoom in functie without scaling the video size.
      I finally found this function setMode ..this works!

      But now i am trying to make a numeric stepper so that you can zoom in using this component of flash.

      Does anyone know what i am doing wrong?

      You can download the fla file at:

      http://www.webdesign-cs.com/webcamtest/webcam_zoomtest.fla

      and the code is:

      // video instance op de stage
      var zoom_nstep:mx.controls.NumericStepper;
      var my_cam:Camera = Camera.get();

      //my_cam.setMode(100, 100, 18);

      var my_video:Video;
      my_video.attachVideo(my_cam);
      var dimensions_lbl:mx.controls.Label;
      dimensions_lbl.setStyle("fontSize", 9);
      dimensions_lbl.setStyle("fontWeight", "bold");
      dimensions_lbl.setStyle("textAlign", "center");
      dimensions_lbl.text = "width: "+my_cam.width+", height: "+my_cam.height+", FPS: "+my_cam.fps;

      zoom_nstep.minimum = 0;
      zoom_nstep.maximum = 200;
      zoom_nstep.stepSize = 15;
      zoom_nstep.value = my_cam.width;

      function zoomin() {
      my_cam.setMode(zoom_nstep.value, zoom_nstep.value);
      ;
      //trace(zoom_nstep.value);
      }
      zoom_nstep.addEventListener("change", zoomin);