test_001(ほんのお試し)
♥0 |
Line 27 |
Modified 2010-05-20 11:17:16 |
MIT License
archived:2017-03-20 07:24:12
ActionScript3 source code
/**
* Copyright DRAFT_BEER ( http://wonderfl.net/user/DRAFT_BEER )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/4tm8
*/
package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFieldType;
public class FlashTest001 extends Sprite {
public function FlashTest001() {
// write as3 code here..
var tf:TextField = new TextField();
//
tf.type = TextFieldType.DYNAMIC;
tf.background = true;
tf.backgroundColor = 0x000000;
tf.multiline = false;
tf.wordWrap = false;
tf.autoSize = TextFieldAutoSize.LEFT;
//
var fmt:TextFormat = new TextFormat();
fmt.size = 200;
fmt.color = 0xffff00;
fmt.font = "_等幅";
//
tf.text = "ok";
tf.x=20;
tf.y=20;
tf.setTextFormat(fmt);
//
addChild(tf);
}
}
}