Linuxでフラッシュを作る

Linuxでフラッシュが作りたいと思って調べてみた。GUIのツールはなかなか見つからないが、GUIでなくてもいいのならswftoolsというのが良さそうだ。Ubuntuリポジトリにも入っている。

# swftest.sc
.flash bbox=512x384 fps=25 name="swftest.swf" compress
  .gradient mygrad:
    0% gray
    50% white
    100% gray
  .end
  .sound s1 "test1.wav"
  .box background width=512 height=384 fill=mygrad
  .font mplus "mplus-1p-bold.ttf"
  .png img1 "test.png"
  .button button1
    .show img1 as=idle
    .show img1 as=area
    .show img1 rotate=30 as=pressed
    .show img1 rotate=15 as=hover
  .end
  .text mytext font=mplus text="hello, world ハローワールド" color=blue size=30pt
  .play s1
  .put background
  .put button1 x=30 y=90 scale=50%
  .put mytext x=20 y=40 rotate=15
.end

こんな感じに書くとSWFファイルが作成できる。