Inicio > Actionscript 3, Flash > Tutorial Actionscript 3 – How to use a webcam on Flash

Tutorial Actionscript 3 – How to use a webcam on Flash

sábado, 18 de abril de 2009 miguelMoraleda Dejar un comentario Ir a comentarios

Aca les dejo un ejemplo de como usar su camara web con actionscript. Realmente no tiene ninguna ciencia.
Aca el codigo, mas abajo pueden ver y/o descargar el ejemplo

1
2
3
4
5
6
7
8
9
10
//Creo una instancia de video de 640x480
video = new Video(640, 480);
//Obtengo la referencia a la camara
camara = Camera.getCamera();
//setMode configura el width, height y framerate de la camara
camara.setMode(640, 480, 30);
//Atacho la camara al video.
video.attachCamera(camara);
//finalmente agrego el video al scenario
addChild(video);

VER EJEMPLO
DESCARGAR EJEMPLO

Categories: Actionscript 3, Flash Tags:
  1. Rodolfo Lopez Navarrate
    miércoles, 26 de agosto de 2009 a las 13:36 | #1

    genial bien

  2. jueves, 14 de enero de 2010 a las 13:06 | #2

    Don’t forget to correctly define the camera and video variable types:
    var video:Video = new Video(640, 480);
    var camara:Camera = Camera.getCamera();

  3. ani
    lunes, 15 de febrero de 2010 a las 03:52 | #3

    Very nice article…

  4. Carlos
    miércoles, 24 de febrero de 2010 a las 14:21 | #4

    Hi Can you help me ? i use this to turn on webcam but how i can show my webcam image to other people ?

    I hope u can help me.

  5. miércoles, 24 de febrero de 2010 a las 15:01 | #5

    John: Sure, if you download the example you will see, the type of the vars are defined. In the post is only an example of how to use it. Have not the definition var too.

    Carlos: To do that, you have to stream your webcam. This must be done using a server like Flash Media Server or RED5. Look for streaming in google you will found a lot of info.

*

Spam Protection by WP-SpamFree

Get Adobe Flash playerPlugin by wpburn.com wordpress themes