TextFieldX: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
txt.width = 640; | txt.width = 640; | ||
txt.height = 960; | txt.height = 960; | ||
txt.text = "HelloWorld!";txt.setTextFormat(tf); | txt.text = "HelloWorld!"; | ||
txt.setTextFormat(tf); | |||
addChild(txt); | addChild(txt); | ||
} | } | ||
Line 26: | Line 27: | ||
} | } | ||
</pre> | </pre> |
Latest revision as of 15:31, 7 April 2013
A ßêãµ project
package { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; public class TextFieldX extends Sprite { public var txt:TextField; public var tf:TextFormat; public function TextFieldX() { tf = new TextFormat("_typewriter"); // Courier New txt = new TextField(); txt.width = 640; txt.height = 960; txt.text = "HelloWorld!"; txt.setTextFormat(tf); addChild(txt); } } }