possible to grab frames from Camera and send to server?
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: possible to grab frames from Camera and send to server?

  1. #1
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349

    possible to grab frames from Camera and send to server?

    I've been reading about the Flash CS3 Camera class and can't seem to find out if there is any way I can grab a frame or two off the camera and send it to a web server. Is this possible?
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    From what I have read about the following classes:
    Camera
    Video
    IBitmapDrawable
    DisplayObject
    BitmapData

    It should be possible to capture a frame into BitmapData. I will leave the details to you, I assume that you have worked out how to send the image to your server.

    You should be able to wrap the camera in the video object, then draw than onto a bitmap data (instead of addChilding it). Livedocs are your friend.
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    I have always used livedocs extensively and I think they could be much better. PHP, for instance, has amazing documentation. I have read the docs on Video and Camera extensively and I've seen code examples and methods that allow you to attachCamera to a video but I have not seen any methods or properties in them that would yield frame data. Seems to me that if its possible to grab a frame from either camera or video or if it's possible to export camera input to a netstream or socket then the documentation should lead you there from these classes.

    I'll read the bitmap and display object stuff but I sure could use more tips.
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    All right, to fill in 69...'s hint a bit more, Video is a DisplayObject, which implements IBitmapDrawable, which means you can draw it to a BitmapData, and from there you have your frame data.

  5. #5
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    Quote Originally Posted by 5TonsOfFlax
    All right, to fill in 69...'s hint a bit more, Video is a DisplayObject, which implements IBitmapDrawable, which means you can draw it to a BitmapData, and from there you have your frame data.
    Pretty much. Just BitmapData.draw (Video) and you have your frame data.
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

  6. #6
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    OK this is helpful guys. Thanks! I'll see if I can throw something together and post it here.
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

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

Poll by Flashkit.com