Creating FXG for flex
I need to create flash content dynamically- towards that need to build开发者_运维百科 images. I need help on two points a) are vector graphics always better than raster graphics on size/ do vector graphics take longer to render b) do we have open-source tools to create fxg files to import into flex builder
rg
for your b) point: just use Inkscape SVG editor. It will allows you to convert svg to fxg starting version 0.49 thanks to the svg2fxg plug-in.
In the mean time (version 0.48) you can install the svg2fxg plug-in manually:
Install Inkscape http://inkscape.org/download/
Get the 2 svg2fxg plug-in files from here:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/share/extensions/svg2fxg.inx
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/share/extensions/svg2fxg.xsl
and copy them in Inkscape extension folder (C:\Program Files (x86)\Inkscape\share\extensions on Windows 7)
You can now start Inkscape and will get a new "File -> Save As -> Flash XML graphics (*.svg)" entry.
I successfully tested it and used the fxg generated assets in on IPhone: it works fine :-)
WRT b)
I don't know an OpenSource tool, however FXG is not hard to create by hand. Just look at the button skin for example and copy the FXG definitions and play around. FXG is pretty intuitive.
Found this handy FXG editor, the only one that ive found so far:
http://fxgeditor.7jigen.net/edit/id/309
Also downloadable as an AIR app:
http://labs.7jigen.net/2010/05/15/fxg-editor-air-app/
Another solution - use a good SVG editor such as SVG Edit or yEd, then convert SVG to FXG using S2F Converter.
精彩评论