Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 1, 2008 - Submit Your Web Site for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 08, 2008, 09:30:25 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Kind Of An Uber Level Question Here  (Read 532 times)
Onideus_Mad_Hatter
MR-Disabled
Intergalactic Cowboy
*
Offline Offline

Posts: 62


My Pointy Teeth


WWW
« on: December 12, 2006, 12:47:16 AM »

I gots nyah:

* Link Edited Out

And when you hit the save button it needs to produce an image that the user can actually save to their hard drive.  Problem is that Flash can't save content created within itself outside of XML files, so unless it's an image preloaded into the SWFs library it can't be saved outright within itself (well maybe, it might be possible to hack the SWFs library within itself with the new image content but that'd take days just to attempt it and even then it might not actually work).

So because of that limitation I need something that can, PHP being the most obvious choice.

The problem I'm having is getting the pixel data to a PHP script so that it can build the final image.  Right now, if I send over just the pixel hex codes, separated by commas I'm looking at roughly 172,032 characters that need transferred to the script.  I tried to use GET variables and it just stalled, crashed and said the URI was too long.

So my next plan is to try and compress that data first within the Flash file and then once compressed send it to the PHP script that will uncompress it and then construct the final image.

I also tried to use POST variables and that didn't work, but I think the reason it didn't is because it defaults to GET variables if you're sending teh data to an external page/script rather than to the current page itself.  So I might experiment with that, see if I can get it to
work first before I try compressing the data.

What I'm wondering though is if there might be another option that I'm over looking.  I did consider just transferring over the image file locations and having PHP use that to rebuild the final graphic on its end, but the problem with that is that you can alter the hue, saturation and lightness of the images from within the Flash file, so that would mean I would need to send over all the color matrices for each layer as well and that would be a MAJOR hassle, not to mention I don't think the color matrices would turn out exactly the same when used in PHP as they would in Flash.

Another method I've considered would be to have the Flash file save the pixel data in the form of an XML file and then have the PHP script simply work off that...the only downside to that is coming up with a viable means of session tracking.  I was thinking I could use a basic file name with a date/time stamp on it and maybe include the users IP as apart of the file name, then after the XML file is created on the server it'll launch the PHP script which will then access the
pixel data in the XML file, construct the savable image and then delete the XML file off the server.

I don't much like that option though because then it's sort of needlessly writing, deleting and rewriting data to the server constantly which equates to more wear and tear on the server.


- Edited by Mitch for Adult Content, If you wish to see the link (to help the poster out) please PM the poster for a request.  Thanks!
« Last Edit: December 12, 2006, 04:59:08 AM by Mitch » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM