Php – Technical requirements for Flash AS3 image manipulation and saving application

actionscript-3MySQLPHP

I am building a Flash AS3 application that allows users to modify images, and then submit-save them to a server.
The user will then have the ability to log in and access these saved images in a thumbnail gallery. They can either delete an image or click a thumbnail to view it at original size.

I am comfortable with the front end having built something similar in AS2 and Flash 8 a few years back.
What will be required for the backend?
I assume some type of PHP-MySQL database is needed. Not sure about hosting issues requirements as the AS2 application I built never sent any actual binary data, but rather data describing the image transformations. I assume I will need to make use of byteArray?

Is there an existing tutorial or code sample that does something similar available for viewing-download?

Are there any security restriction 'gotchas' associated with FP9 -10 I need to be aware of?

Best Answer

the most simple way is to create the image in the client ... get a BitmapData snapshot of the image using BitmapData::draw ... convert this to JPEG or PNG using the as3corelib, that offers encoders for both formats ... and then just send the raw binary data to the server (store it into the data property of your URLRequest) and there, store it to the file system (retrieve it in $HTTP_RAW_POST_DATA) ... so the whole storage process is just a couple of lines ...

you will need a database of course, for session management (you could rely on PHPSESSION only, but personally i don't trust it), login, registration and to store which image belongs to which user ...

so yeah, the whole netcode/backend/storage thing etc. will be quite a piece of cake (btw. you might wanna look into amfphp) ... designing a good interface and implementing the galery view etc. will be the biggest chunk i guess ...

there are no real security gotchas, as long as your SWF comes from the same server, that it communicates to ...

so good luck then ... ;)

greetz

back2dos

Related Topic