A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: flash webcam access

  1. #1
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198

    flash webcam access

    does anyone know how to get the video stream of a webcam into flash??
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  2. #2
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    I found a tutorial for Adobe Flash:
    http://uploads.ungrounded.net/364000...utorial_ng.swf

    but get I stuck at the beginning:

    1. Get your webcam on the screen
    Create a layer 'video_obj'. => ok
    put in the layer a video object: Library (top-left) > New Video...=> hmm (no ideo how to do that ^^)
    the rest is easy:
    define the video object as a video.

    Code:
    var video_vobj:Video = new Video();
    Make a camera object and get your webcam.
    Code:
    var cam:Camera = Camera.get();
    Attach the camera to the video object.

    Code:
    video_vobj.attachVideo(cam);
    ---

    but only the code:
    Code:
    var video_vobj:Video = new Video();
    var cam:Camera = Camera.get();
    video_vobj.attachVideo(cam);
    without the "video object" doesn't work for me
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  3. #3
    Junior Member
    Join Date
    May 2002
    Posts
    4
    His code didn't work for me either. Here is a simple one line of code that DOES work:

    video_vobj.attachVideo(Camera.get());

    Where video_vobj is the name of the instance of the video on stage.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center