Join 132,013 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,811 people online right now. Registration is fast and FREE... Join Now!
I'd like to check the feasibility of taking user generated output from a Flash movieclip (text and basic shapes to begin with), and output the content either directly to an EPS compatible file, or to a format that can be converted to EPS.
I know how to output data from Flash to make a bitmap file (reading the data pixel by pixel) and send the data to PHP to process it, but this is for signwriting so the output needs to be either a very high resolution (probably causing bandwidth problems) or scalable.
Does anyone here know of any options that I could check out?
Thanks in advance.
This post has been edited by muso: 21 Aug, 2007 - 11:41 PM
Another line of thought that I've just had is whether it's possible to export to a FLA, or if it's possible to save data from the movieclip so that it can be recreated in Flash so I can use the export image to EPS option there.
I'd love to be proven wrong, but I don't think any of those are possible yet...
Exporting to a bitmap certainly is possible with getPixel, and that could be batch traced with an application, but this has technical limitations (although perhaps not prohibitively so...).
My feeling is that the only other way to do it with Flash is to only use the SWF to preview the drawing to the user when they design it, and to send back information on all of the text and shapes used and attributes like size, rotation, position and colour, and from that recreate the vector image from those attributes either: by hacking the information somehow into a SWF or FLA (SWFs can be created on the fly, but I don't know much about this process), and then export as an EMF; or to use another drawing package or other application and somehow automate using the information exported from Flash.
Well, you've certainly created quite a challenge! I think the key to executing this challenge is an understanding of the file-type you wish to write to. Without knowing how the file-type describes a shape, you can't know what data to send to the server.
However, I think what you've stated in your last post is the way to approach this problem. It would be very easy to save the object parameters out to a text file or database, and then read them back in to another Flash program that utilizes Flash's printing capabilities.
Noting is impossible.. you just need the right tools I guess.
My train of thought on this topic goes like this:
1. All content inside the SWF can be tracked (ie. co-ordinates, size, colour)... Therefore that info can be output(ed?). 2. If info needs to be output then it's better to create it dynamically (AS) and all data stored automatically in a variable ready for output. 3. Will most probably need to send to PHP or similar. 4. External code (PHP, ASP etc) converts to EPS. We know that PHP can do PDF without a hiccup, so why not EPS?? 5. PDF's save vector information... EPS similar to PDF... Export of Flash vectors POSSIBLE to EPS IF external software allows.
Thanks again. I still need to find if Flash printing will help, but I know that they will want to output to a vector format of some kind also. At the moment I'm experimenting to see if I can get SVG output that resembles text in Flash - something not too dissimilar to one of these:
Incidentally, I'm trying out with SVG because it seems to be an open format, and perhaps is more flexible. At this point, I'm still unsure which is the better option to go for: EPS or SVG.
SVG is a good idea, actually. However, what do you intend to use the EPS/SVG for?
If for print, then SVG won't cut it. I've tried open software that worked with SVG but had problems with colour and printer support.
With SVG my thoughts were that it was a means to get something out - i.e. thinking that they could (batch) convert it to AI or EPS (these are formats that they know that they can work with).
To answer your other question, it isn't so much for printing as it is for cutting (masks), so any curves need to be exact, and shapes can't have an incomplete border; it's for creating signs and basic adverts for vehicles, so accuracy in the scaling is rather important. I haven't yet seen the process in action, which would probably help.
What kind of problems have you encountered printing with SVG?