flash on 2011-3-26
インポート文(使用するクラスの宣言)
クラス(設計図)
♥0 |
Line 17 |
Modified 2011-03-26 17:07:25 |
MIT License
archived:2017-03-20 16:16:23
ActionScript3 source code
/**
* Copyright yprops ( http://wonderfl.net/user/yprops )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/1Clk
*/
package {
//インポート文(使用するクラスの宣言)
import flash.display.Sprite;
import flash.text.TextField;
//クラス(設計図)
public class FlashTest extends Sprite {
//変数定義
private var myText :TextField;
//コンストラクタメソッド
public function FlashTest() {
// TextField インスタンス(部品) 作成
myText = new TextField();
myText.text = "HelloWorld!!\nあああ";// ¥n
myText.width = 200;
myText.height = 200;
myText.border = true; //表示したくなければ false
myText.background = true;
//追加のテキストを入れたい時推奨のメソッド
myText.appendText("追加テキスト");
//this.x = 100;
this.addChild(myText);
}
}
}