3 ms·
This is such an excellent offer! I would definitely need your help. I've been working on a project of mine, where I need to the webcam to take a photograph of
by phoenix24 16y ago
This is such an excellent offer! I would definitely need your help.
I've been working on a project of mine, where I need to the webcam to take a photograph of the user.
something like chatroulette, but i need users to take only the photo. then send it back to my server where i'll do further processing.
I am an ActionScript noob, so any help in libraries/sample code or approaches that you could offer would be immensly helpful.
Thanks!
- dgant 16y agoI haven't worked with webcams. I imagine the AS3 docs, and the included examples, should cover your use case: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/ http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/ For sending the photo, you probably want to look at URLRequest: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLRequest.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl... A solution might look like this: 1) Set up your server to accept HTTP POST requests which include a photo, in whatever data format you plan to transmit them 2) Obtain the image data from your webcam (I have no particular insight into this) 3) Create a URLRequest 4) Assign the URLRequest's 'url' property as appropriate 5) Assign the URLRequest's 'data' property to to the image data 6) Set the URLRequest's 'method' property to URLRequestMethod.POST 7) Set other URLRequest properties, like ' requestHeaders', as appropriate 8) Add event handlers to the URLRequest as appropriate 9) Call the URLRequest's load()