PDA

View Full Version : Exporting a Snapshot via Actionscript...?


Homestar
07-06-2005, 12:22 AM
Hey Guys,

Is this the holy grail? I'm building one of those "Create your own E-Card" interfaces all in Flash, which lets you import your own JPEG onto a pre-cooked background, then you can scale it, adjust brightness/contrast etc. then hit "SEND".

Now the question is... Can I take all the user's fine tuning and turn the whole thing into one finished, composited, flattened JPEG to send back to the server?

On a scale from ludicrous to utterly impossible, how can I do this from inside Actionscript?

Warmest Regards,
Rick

deadbeat
07-06-2005, 12:29 AM
From inside Actionscript? Utterly impossible...

This quesiton gets asked a lot, search around and you can probably find a PHP/ASP based solution for this, but it's a complicated matter...

K.

Electric Dandy
07-06-2005, 01:58 AM
maybe it can be done this way

I have a suggestion that clears a third of the problem, because I have no knowledge on how to export variables to a text file through flash. But there's a way to control a file by having it reading a list of variables out of a text file.

Say you have a "clock.swf" containing two sticks to point out the time. They're at "1" and "3" because the actionscript inside the clock.swf reads this info out of a .txt file.

The user can alter the sticks by dragging them, he puts them on "5" and "12". Now the clock.swf alters the info in the .txt file. That's the part I DON'T know how to do. (instructions welcome)

Now the user can send the card. When received, the in itself un-altered clock.swf reads the new data from the .txt file. (I have the impression that people use XML to organise more extensive information, instead of a harder-to-structure .txt-file).

Of course, this way the "alternative JPG" has to be put on the server as well. Probably there's an "upload.JPG"-actionscript available somewhere...