FXGは次世代のflashオーサリング用のフォーマットらしいのですが、そのフォーマットに書き出すコマンドがベータ版に追加されていました。
http://labs.adobe.com/technologies/fireworkscs4/releasenotes.htmlより引用
Export to FXG This is an export script that generates vector graphics code for future use with next-generation Flash Player authoring applications. Currently, we are not looking for feedback on this command.
下のパス絵をCommands > Export to FXGで書き出す。
書き出されるコードは以下
<?xml version="1.0" encoding="UTF-8"?> <graphic version="1.0" xmlns="http://ns.adobe.com/fxg/2008" xmlns:fw="http://ns.adobe.com/fxg/2008/fireworks" viewHeight= "291" viewWidth= "369"> <library> </library> <group id="Page 1" fw:type="page"> <group id="State 1" fw:type="state"> <group id="Layer 1" fw:type="layer"> <path data="M 76 88 C 76 86 78 84 80 84 C 81 84 83 86 83 88 C 83 90 81 92 80 92 C 78 92 76 90 76 88 Z M 61 90 C 72 77 88 61 107 64 C 126 67 112 91 133 100 C 148 107 184 100 192 100 C 223 101 262 95 288 116 C 316 139 324 155 292 179 C 254 208 218 212 171 208 C 166 208 160 207 155 206 C 155 206 154 206 154 206 C 149 214 156 228 148 233 C 144 236 140 238 138 243 C 137 243 136 244 135 243 C 130 237 149 233 137 233 C 136 233 136 233 137 233 C 138 233 138 234 138 234 C 136 234 132 235 129 234 C 128 233 130 232 130 232 C 130 232 131 232 131 232 C 130 231 125 232 124 230 C 123 225 136 228 137 229 C 138 229 148 229 149 228 C 149 226 149 206 148 205 C 146 203 135 202 131 201 C 130 200 129 200 128 200 C 122 203 121 215 120 221 C 119 223 119 226 117 228 C 116 229 107 240 105 239 C 101 237 109 232 110 231 C 111 230 112 229 112 229 C 111 228 110 228 110 228 C 107 228 106 231 104 232 C 102 233 90 234 96 230 C 98 229 100 229 101 228 C 102 227 104 225 102 225 C 102 225 99 225 99 225 C 97 225 95 227 93 226 C 91 225 98 223 98 223 C 103 221 110 225 115 222 C 120 218 117 209 119 204 C 119 204 122 198 122 198 C 122 197 122 197 122 197 C 122 196 121 196 121 196 C 107 188 95 174 84 162 C 52 128 84 136 73 107 C 69 97 51 101 61 90 C 61 90 61 90 61 90 Z " blendMode="normal" alpha="1"> <fill> <radialGradient x = "-151" y = "-150" scaleX = "440" scaleY = "440" rotation = "13"> <gradientEntry color="#00ccff" ratio="0"/> <gradientEntry color="#ffffff" ratio="0.9944444298744202"/> </radialGradient> </fill> </path> </group> </group> <group id="State 2" fw:type="state"> <group id="Layer 1" fw:type="layer"> </group> </group> </group> </graphic>
ステート(フレーム)を2つ作っていて1フレにパスデータ、2フレ目は空です。
ライブラリに登録されているものもステージに配置していないと出力されないので
で、注目したのはパスで鳥の形を描いている部分。
実際、DEGRAFAで使ってみるとちゃんとパスをドローしました。
ゆくゆくはこの辺のコード周りを簡単にコピペできる機能拡張とか出来たらいいなー、とか妄想。