package { import flash.display.Sprite; import flash.text.TextField; public class HelloWorld extends Sprite { public function HelloWorld():void { /* ここでしか使わない変数なのでここで定義 */ var txtTitle:TextField = new TextField(); txtTitle.text = "HelloWorld!!!!" addChild( txtTitle ); } } }