Help!
I am trying to write some PHP code that will allow me to import an image into flash (swf), rotate it, change the colour and position and then export a JPG based on what the user has selected.
Apparently this isn't that easy. I can get the jpg's into FLASH no problem; it's the exporting a JPG that seems to be problematic. Anybody have any ideas as to which road I should take on this one?
At present I am thinking that I will have to HTTP POST the location, name, size, color attributes of the jpg to PHP (using actionscript) and then try to duplicate the image using the built in PHP GDLib or ImageMagik functions.
It doesn't necessarily have to be a JPG... PNG would work well too.
SWF 2 JPG
Moderator: General Moderators
-
jakobdoppler
- Forum Commoner
- Posts: 46
- Joined: Wed May 21, 2003 6:16 pm
I think what he is trying to do, is building some flash GUI for simple Image manipulation. U can use AS functions to translate, rotate or change some channel color of the movieclips containing loaded .jpgs. I don't think there is a possibility yet in Flash to manipulate single pixel values , but if you only want these few simple operations it should work fine, just to recieve the parameter (e.g. rotation angle, scale) in AS, process them to PHP and use them in GDLib.I confused as to where flash comes into it, maybe you could clarify.
But this is rather a problem of PHP AS interaction capabilities as a whole.
I once successfully communicated between Flash and mySql via phpScripts as gateway. I'd have a look at AS loadVars object, that is quite simple to use. For a higher quality approach on flash remoting, you might wanna try http://www.amfphp.org (makes use of php classes and their transference to flash)
related info
- loadVars on http://www.actionscript-toolbox.com
- there you might get better help on AS and flash issues http://www.flashkit.com/board
I eventually figured out how to do this... here is one way with PHP scripts (and MING
) http://jerryscript.hostrocket.com/flash ... 2JPEG.html
I wanted to do something a little bit different. I imported the image into flash with PHP as a bridge on the server side. The user then messes around with colours and moves the image around. When everything is said and done, I exported all of the information back to PHP and then basically duplicated the users choices using GDLib functions.
Worked pretty good; unfortunately the client realized that their business model was inherently flawed so the project has been scrapped. C'est la vie.
Thanks for the comment(s).
I wanted to do something a little bit different. I imported the image into flash with PHP as a bridge on the server side. The user then messes around with colours and moves the image around. When everything is said and done, I exported all of the information back to PHP and then basically duplicated the users choices using GDLib functions.
Worked pretty good; unfortunately the client realized that their business model was inherently flawed so the project has been scrapped. C'est la vie.
Thanks for the comment(s).