forked from: flash on 2010-2-22
forked from flash on 2010-2-22 (diff: 26)
ActionScript3 source code
/**
* Copyright mhayashi ( http://wonderfl.net/user/mhayashi )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/zbpx
*/
// forked from mhayashi's flash on 2010-2-22
package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class MyTextField extends Sprite {
public function MyTextField() {
// Text Format
var tf:TextFormat = new TextFormat();
tf.font = "_typewriter";
tf.size = 18;
tf.color = 0x0000FF;
// Text Field
var fld:TextField = new TextField();
fld.x = 100;
fld.y = 50;
fld.autoSize = TextFieldAutoSize.LEFT;
fld.background = true;
fld.backgroundColor = 0xffff00;
fld.defaultTextFormat = tf;
fld.text = "楽しいActionScriptの世界へ";
addChild(fld);
}
}
}
