swfmill でイメージふるえる swf

SwfmillWithImage.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie width="180" height="130" framerate="30">
  <background color="#cc0000"/>
  <clip id="img0" import="library/img0.jpg"/>
  <place id="img0" depth="1" />
  <frame />
  <place x="1" id="img0" depth="1" />
  <frame />
</movie>

  • place したものを削除する方法わからず。むりやり同じ depth に。

vim と make と swfmill で swf 作り (on windows)

HelloSwfmill.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie width="320" height="240" framerate="12">
  <background color="#ffffff"/>
  <font id="font0" import="C:/Windows/Fonts/arial.ttf" glyphs="Helo Swfmi!" />
  <textfield id="txt" width="200" height="50" size="15" font="font0" text="Hello Swfmill!"/>
  <place id="txt" name="output" depth="1"/>
  <frame />
</movie>
makefile
targ_dir = C:/Documents and Settings/$(USERNAME)/My Documents/tmp
targ_url = http://127.0.0.1/tmp

swfmill="C:/tools/swfmill-0.2.10-win32/swfmill.exe"
firefox = "C:/Program Files/Mozilla Firefox/firefox.exe"

all:
	$(swfmill) simple HelloSwfmill.xml test.swf
	copy test.swf "$(targ_dir)/test.swf"
	copy test.htm "$(targ_dir)/test.htm"
	$(firefox) $(targ_url)/test.htm

  • swfmill simple で デバイスフォントにする方法わからず。

vim と make と mtasc で swf 作り (on windows) (2)

昨日のはミニマム。プレビューはローカルサーバでするほうがいい。たぶん。

apache インストール
省略
makefile
targ_dir = C:/Documents and Settings/$(USERNAME)/My Documents/tmp ← 例
targ_url = http://127.0.0.1/tmp  ← 例

mtasc="C:/tools/mtasc-1.11/mtasc.exe"
firefox = "C:/Program Files/Mozilla Firefox/firefox.exe"

all:
	$(mtasc) -swf test.swf -main -header 200:20:30 HelloMtasc.as
	copy test.swf "$(targ_dir)/test.swf"
	copy test.htm "$(targ_dir)/test.htm"
	$(firefox) $(targ_url)/test.htm
test.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>test</title>
</head>
<body>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="flashObject" align="middle">
  <param name="allowScriptAccess" value="sameDomain" />
  <param name="movie" value="test.swf" />
  <param name="loop" value="false" />
  <param name="quality" value="high" />
  <param name="scale" value="noscale" />
  <param name="salign" value="lt" />
  <param name="bgcolor" value="#ffffff" />
  <param name="menu" value="true" />
  <embed src="test.swf" quality="high" scale="noscale" salign="lt" bgcolor="#ffffff" menu="true" width="100%" height="100%" name="flashObject" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
HelloMtasc.as
class HelloMtasc {
  static function main(mc) {
    _root.createTextField("txt",1,0,0,200,20);
    _root.txt.text = "Hello Mtasc !";
  }
}

vim と make と mtasc で swf 作り (on windows)

vim インストール
省略
firefox インストール
省略
mtasc インストール
省略(mtasc は、C:/tools/mtasc-1.11/mtasc.exe にあるとする)
make インストール
http://www.mingw.org/download.shtml から mingw32-make-3.80.0-3.exe (gnu make のインストーラ) をダウンロード。実行。
_vimrc 設定
次の行を追加
set makeprg=C:/Mingw/bin/mingw32-make.exe
(本来なら C:/Mingw/bin を 環境変数 Path に追加すべきだけど vim で make 使うだけならこれでOK。たぶん)
ソースファイル編集
作業ディレクトリ(例えば C:/Documents and Settings/$(USERNAME)/work/)で HelloMtasc.as と makefilevim で編集。
HelloMtasc.as
class HelloMtasc {
  static function main(mc) {
    _root.createTextField("txt",1,0,0,200,20);
    _root.txt.text = "Hello Mtasc !";
  }
}
makefile
work_dir = C:/Documents and Settings/$(USERNAME)/My Documents/work
mtasc="C:/tools/mtasc-1.11/mtasc.exe"
firefox = "C:/Program Files/Mozilla Firefox/firefox.exe"

all:
	$(mtasc) -swf test.swf -main -header 200:20:30 HelloMtasc.as
	$(firefox) "file:///$(work_dir)/test.swf"
※ 行頭の空白は Tab
make
作業ディレクトリがカレントディレクトリであることを確認しつつ
:make
HelloMtasc.as にエラーがあればリターンでエラー行へ、 なければfirefox でプレビュー。

MTASC

MTASC http://www.mtasc.org/ 試した。

make を使うのが筋だと思うけど、Windows なら、ショートカットをつくって

  Target:(略)\mtasc.exe -swf out.swf  -main -header 400:300:20
  Start in:  ./Desktop

で、tes.as ファイルをドラッグ&ドロップ。が楽だ。path とか触りたくないし。


とにかくごめんよ Macromedia。MX2004 で懲りちゃったので、Flash8 は、ちょっと買えないんだ。しばらく MTASC で遊んでみるよ。


追記:
エラー見れないので、ショートカットはつらかった。

追記:
http://www.noridon.net/weblogs/archives/2005/07/flash_mx_2004fl.html
とりあえずこれだな。