2

I would like to know if there's a way you can take a screenshot of a flash object embedded in a page, and then email the PNG or JPG using the mailto: form submission to a specific address. So far I have investigated various javascript methods, but none of them have worked.

Thanks in advance.

jacktheripper
  • 13,953
  • 12
  • 57
  • 93
  • May I ask you to specify the question? Do you have problems with taking screenshot? Or you having troubles with compressing it into PNG or JPG? Did I understood correctly that you want to post file to server from JS side? – Eugeny89 Feb 17 '12 at 12:11
  • I cannot work out how to pass the information from the screenshot taken into a form upload field, which can then get posted to an email via mailto: when the user clicks submit. – jacktheripper Feb 17 '12 at 12:22

2 Answers2

1

It's reasonably simple to do. Once you have the screenshot data, you need to base64 encode it and send it to a serverside script. From there you should setup the email message with the correct MIME type (multipart) and set the correct image headers and content boundaries.

Are you able to build the form in flash and send everything to a PHP script? This is the method I have used in the past.

This may get you started: embedding image in html email

http://www.phpeveryday.com/articles/PHP-Email-Using-Embedded-Images-in-HTML-Email-P113.html

Community
  • 1
  • 1
Alexander Holsgrove
  • 1,795
  • 3
  • 25
  • 54
-1

html2canvas does this, although i'm not sure if it uses mailto...if it doesn't and you don't like this solution, then this answer is totally wrong...but this lib has the functionality that you desire: http://html2canvas.hertzen.com/

albert
  • 8,112
  • 3
  • 47
  • 63
  • 3
    html2canvas doesn't support Flash :-/ – benesch Feb 17 '12 at 18:28
  • 1
    sorry d00d. check out flashcanvas then: http://flashcanvas.net/ and whatever trololololololo marked this down one, it's going to be ok. your life doesn't have to suck so hard. happiness is a choice. – albert Feb 17 '12 at 19:51