flash on 2009-9-12
♥0 |
Line 26 |
Modified 2009-09-12 11:22:25 |
MIT License
archived:2017-03-30 09:41:14
ActionScript3 source code
/**
* Copyright hacker_9p8x8mco ( http://wonderfl.net/user/hacker_9p8x8mco )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/p2An
*/
package{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFieldType;
[SWF(width="400",height="300",frameRate="24")]
public class TextFieldTest extends Sprite{
public function TextFieldTest(){
var tf01:TextField = addChild(new TextField()) as TextField;
tf01.text = "文字表示";
var tf02:TextField = addChild(new TextField()) as TextField;
tf02.y = 60;
tf02.autoSize = TextFieldAutoSize.RIGHT;
tf02.textColor = 0xff0000;
tf02.border = true;
tf02.borderColor = 0x00ffcc;
tf02.background = true;
tf02.backgroundColor = 0x0000ff;
tf02.type = TextFieldType.INPUT;
tf02.multiline = true;
tf02.maxChars = 2;
tf02.restrict = "a-zA-Z";
// tf02.displayAsPassword = true;
tf02.text = "文字列表示autosize";
}
}
}