7 Replies Latest reply on May 20, 2008 9:35 PM by kglad

    Video Screenshot Capture

    x_Shiver

      I need to capture a frame (pressing a button on stage) of a streming video coming from webcam in local system, and send this image to a DB when user confirms.

      How does AS do this?
      Is it possible in AS2?

      Thanks in advance!
      :)

        • 1. Re: Video Screenshot Capture
          kglad Adobe Community Professional & MVP
          you'll need to create a bitmapdata object of the screenshot and store the pixel data in a string or array. then you need to send these data to a server-side program that (re)creates the bitmap and stores it on your server (or elsewhere) and records a reference in your db.

          this is not a task for a beginning programmer.
          • 2. Re: Video Screenshot Capture
            x_Shiver Level 1
            Thank You

            So You suggest using the draw() method, right?

            And isn't there a way to have flash saving the BitmapData object in an image file format on local system?

            • 3. Re: Video Screenshot Capture
              kglad Adobe Community Professional & MVP
              yes.

              you can save to a local file. again, all the work would be done by the server-side code.
              • 4. Re: Video Screenshot Capture
                x_Shiver Level 1

                You mean server side AS or other s-side programming?

                Do you have any suggestion on how or where to find more info to save the BitmapData object locally, or on useful programming (or third party application) to process what I need?

                Thank you again
                • 5. Re: Video Screenshot Capture
                  kglad Adobe Community Professional & MVP
                  i don't know of any server modules that allow parsing of as so this would be some other language like asp,php,perl etc.

                  you should start with the languages your server supports. then pick the one from that list with which you're most comfortable. then search for help using that language to do what you want.
                  • 6. Re: Video Screenshot Capture
                    x_Shiver Level 1
                    Ok, so You say that flash itself can't save the BitmapData object in an image file format on local system, right?

                    That is what I needed to know mainly.

                    If it can't, I'll look for it into PHP.
                    How would flash output the BitmapData object in this case to PHP?

                    Than You for your attention
                    • 7. Re: Video Screenshot Capture
                      kglad Adobe Community Professional & MVP
                      correct.

                      you would store the data for each pixel (the bitmapdata class has getPixel() and getPixel32() methods) in an array or string. your php file would take that array or string and recreate the bitmap and save it to your server or present it to the user to download.