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
4
Posts: 4
Reputation: 1,431

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
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Jul 24, 2012 1:38 am

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


Return to How do I....?

Who is online

Users browsing this forum: TELLES0808 and 12 guests