Get an image from Construct to php script?

Get help using Construct 2

Post » Wed Jul 18, 2012 12:31 am

My goal is to improve the form at www.whitkin.com/aga, which is a normal HTML form with an embedded Construct canvas. I'd like to capture the diagram from the Construct window as an image and include it in the email form.   

I'm not a web coding expert (as you will see). I've built this with HTML and Construct. I could do the whole form within Construct, but how to get the image data into the form?

Flash developers tell me there's a method to capture the canvas as an image, and send it as a bytearray to a sendmail script. Is there the equivalent for Construct? I have read the AJAX object and it is unclear what data can be sent. If it's being sent as a URL, that means only strings with no spaces, right? I didn't see an existing plugin for this; would I need to write my own?

Could I somehow access Construct's localstorage using a server script? I doubt it.

thank you in advance!
B
14
S
5
Posts: 4
Reputation: 1,581

Post » Wed Jul 18, 2012 3:27 pm

Try using the system 'Snapshot canvas' action, and then POST the image data to your server with the AJAX object.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464

Post » Tue Jul 24, 2012 1:38 am

awesome! Thanks Ashley. I'll try it.
B
14
S
5
Posts: 4
Reputation: 1,581


Return to How do I....?

Who is online

Users browsing this forum: Vonca and 1 guest