vim と make と mtasc で swf - ctags でタグジャンプ[メモ]

ctags インストール(Windows

Exuberant Ctags は、javascript にも対応。

http://ctags.sourceforge.net/
からダウンロード、解凍。
ctags.exe は、gvim.exe と同じディレクトリへ移動。(とりあえず)

tag 作り

ctags --language-force=javascript *.as

それか

ctags --language-force=javascript *.as C:/tools/mtasc-1.11/std/*.as

makefile

.PHONY:tags
tags:
	ctags ....

で、make tags なのか。

Vim キー操作

C-]  定義元へ
C-T  元に戻る

swfmill で 日本文字を Shared Font [メモ]

swfmill だけでは、うまくできなかった。

  • フォントを埋め込んだ swf は、Flash で作る。残念。その名前が font_exported.swf として

SharedFont.xml

<?xml version="1.0" encoding="iso-8859-1" ?>

  
  
  
  
  

FontShare.as

class FontShare {
  static function main() {
    var tf1 = new TextFormat("(フォント名)", 30, 0);
    _root.createTextField("txt1", 1, 0, 0, 300, 30);
    var txt1 = _root.txt1;
    txt1.setNewTextFormat(tf1);
    txt1.embedFonts = true;
    txt1.text = "漢字も表示したい\rABCDEFG";
    txt1._xscale = 50;
    txt1.autoSize = "left";
  }
}
mtasc -swf FontShare.swf -main FontShare.as
swfmill simple FontShare.xml test.swf

vim と make と mtasc と swfmill でカウンター

SwfmillWithCode.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie width="320" height="240" framerate="1">
  <background color="#cccccc"/>
  <font id="font0" import="C:/Windows/Fonts/arial.ttf" glyphs="0123456789" />
  <textfield id="id_txt0" width="200" height="50" size="20" font="font0" text="0"/>
  <place id="id_txt0" name="txt" depth="1"/>
  <clip id="id_mc0" import="SwfmillWithCode.swf" />
  <place id="id_mc0"/>
  <frame />
</movie>
SwfmillWithCode.as
class withCode {
  static function main() {
    _root.onEnterFrame = function() {
      _root.txt.text = _root.txt.text - 0 + 1;
    }
  }
}
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"
swfmill="C:/tools/swfmill-0.2.10-win32/swfmill.exe"
firefox = "C:/Program Files/Mozilla Firefox/firefox.exe"

	$(mtasc) -swf SwfmillWithCode.swf -main -version 8 SwfmillWithCode.as
	$(swfmill) simple SwfmillWithCode.xml test.swf
	copy test.swf $(targ_dir)
	copy test.htm $(targ_dir)
	$(firefox) $(targ_url)test.htm

  • main の扱い、よくわからず

とりあえず以上。