2006年06月26日
AS3でHello World
おきまりのHello Worldを作ってみました。
---(
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFieldType;
public class test extends MovieClip
{
public function test()
{
var txt:TextField = new TextField();
txt.x = 10; txt.y = 10;
txt.type = TextFieldType.DYNAMIC;
txt.text = "Hello World!";
txt.selectable = false;
this.addChild(txt);
}
}
}
---)
※TextFieldTypeには、"DYNAMIC"(入力できない)と"INPUT"(入力可能)の2つが選べるようです。
トラックバック
このエントリーのトラックバックURL:
http://aoi-project.com/presents/mt/mt-tb.cgi/6