Forums: Flash:

 

Flash export vectors?

first
 

scudsucker Flash export vectors?

So, I know how to save a bitMap created in flash via PHP onto a server.

I have a client who would like, if possible, the output to be a vector file. It is a very simple 2 color design, with basic non-overlapping geometric patterns.

I could just make a .swf that spits out a bitMap and tell him to use one of the trace bitmap tools (I believe Illustrator's one rocks), but it would be nice to do it in real vector form.

Data is currently XML. There must, in theory, be an XML based vector format?

Ideas/suggestions welcome.


Eidt.. as I typed that, SVG came to mind, but can you import SVG into a vector app such as Freehand or Illustrator?

Edit edit - SVG does not look all that easy to create. But probably the best way.

 

Storm

edit edit edit - You're right.

It sounds like a really interesting project. Let us know how it goes.

 

Arsis

I've done this in the past by printing to a pdf then using conversion tools to port the pdf to an ai file. I had a manual process in place though I am sure you could automate it if need be.

 

JLM

ASCollada might be worth a look?

I am fairly sure on bit's forum there was several threads about a tool that ported xml to swf and back, maybe bit rem the link.

 

bit-101

you are probably thinking about swfmill, which converted an FLA to xml and vice versa, i think. i don't know anything that would even be able to introspect drawing api graphics in a swf at all. you could decompile the swf and get the byte code for the AS that drew the graphics, but not the graphics themselves.

i believe you'd have to write your own code that converts your drawing code to svg.


i've been looking into this myself. more at the pdf printing method though, which I believe is how josh davis makes his prints.

 

arigato

You can create a dummy eps printer but it doesn't preserve gradients or transparency...
I have no idea how you might do that online, though.

 

scudsucker

Hmmm.. it is a student project- the website allows people to design their own lampshades which the client will apply to a light he has designed.

So I'd say the PDF route may well be the easiest (very limited edition, low turnover), and can be created on the fly with PHP from bitMapData, but the concept of SVG output is pretty interesting.

I'll see what I can do.

 

Hideaway

While playing here, I made my script to write an SVG xml file and I open it in Illustrator. It is massive since there is tons of data (31,000+ lines of XML), but I got it to work flawlessly.

I plan on posting the source code here or linking to my site when I clean it up, but I doubt lamp shades will require so much info and it may work for what you need.

However, it is using the DrawingAPI to draw the data, so there may be a lot of tweaking involved.

I'll let you know when the source code is up...

I love boots. It's like midgets hugging my calves...
quote
 

Arsis

ahhh to svg.

If' your going to svg then you'll need to be drawing with AS in order to get the information right?

If some of the shapes were created in the IDE then a little bit of jsfl could be used to write the shape point data in preparation for the conversion to svg.

 

scudsucker

Well, I was using attachMovie to create a "grid' of movieclips, with an on/off state- the design is very simple. There is no "drawing" as such. Users are limited to setting each "grid" item to on or off.

With AS2, there is a noticeable lag as 5696 moviclips are added to the stage.

Complicating matters somewhat is that the "grid" is not composed of squares (which would make for easy maths) but of interlocking triangles.

I have a feeling I should be creating the site either in AS3 with sprites (less overhead) or draw the grid with AS, and then work out some way to tell when the mouse is down and over a specific grid item.

Each grid item would then be pretty easy to express as SVG, though I am less sure about loading in a saved design and applying the data to the grid.

I'd be pretty keen to see your code Hideaway.

 

JLM

what do these interlocking triangles look like is it like triangle graph paper?

 

Hideaway

Originally posted by: scudsucker
I'd be pretty keen to see your code Hideaway.


Check here for the example...

I'm going to post the code sometime today when I get a chance...



I love boots. It's like midgets hugging my calves...
quote
 

Hideaway

HOT XXX FLASH TO SVG PORN

I love boots. It's like midgets hugging my calves...
quote
 

scudsucker

OK.. repost, somehow my last one got lost.

Sorry for the late response, I've been on a 5 day hike in the mountains.

JLM- yes, exactly, a triangle graph paper. (I did not know such things existed)

Hideaway - Cool, thanks very much, i'll have a look ASAP.

And finally, HOT XXX FLASH TO EPS PORN

 

JLM

Cool scudsucker

 

arigato

very, thx for sharing!

 
first
 

Forums: Flash: Flash export vectors?

 
New Post
 
You must be logged in to post