アクセスカウンタ -
目次
ActionScriptとは
TODO:ここに記事を編集
環境
実行環境
- 対応するFlashPlayerがセットアップされている環境
開発環境
ドキュメント
例
HelloWorld(ActionScript2.0)
ソース(HelloWorld.as)
/**
* HelloWorld.as
*/
class HelloWorld {
public function HelloWorld(mc:MovieClip) {
var textFormat1:TextFormat = new TextFormat();
textFormat1.font = "_ゴシック";
textFormat1.size = 16;
mc.createTextField("tf1", mc.getNextHighestDepth(), 0, 0, 100, 20);
var tf1:TextField = mc.tf1;
tf1.setTextFormat(textFormat1);
tf1.text = "Hello World!";
mc.createTextField("tf2", mc.getNextHighestDepth(), 0, 20, 100, 20);
var tf2:TextField = mc.tf2;
tf2.setTextFormat(textFormat1);
tf2.text = "こんにちは 世界!";
}
public static function main():Void {
var app:HelloWorld = new HelloWorld(_root);
}
}
コンパイル
mtasc -main -strict -version 8 -header 320:240:24 -swf HelloWorld.swf HelloWorld.as
ノート: ActionScript にて日本語を使用する場合には、ソースファイルの文字コードを UTF-8 にする必要がある。
実行イメージ
最終更新:2008年05月20日 16:10