Say Hello. developer madflash madflash forked:1favorite:0lines:36license : MIT License modified : 2010-03-17 17:01:17 Embed Tweet package { /* * developer madflash */ import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; import flash.text.TextFormatAlign; import net.hires.debug.Stats; [SWF(width="400", height="400", frameRate="20", backgroundColor="#ffffff")] public class I extends Sprite { private static const DEF_POINT_X:uint = 0, DEF_POINT_Y:uint = 100; public function I() { addChild( say("Hello to all!\nI'm a new user of the wonderfl.\n\nnice to meet you :\)") ); } private function say(msg_:String):TextField { var format:TextFormat = new TextFormat(); format.align = TextFormatAlign.CENTER; format.color = 0x0000ff; format.size = 12; format.font = 'MS Gothic'; var txt:TextField = new TextField(); txt.defaultTextFormat = format; txt.selectable = false; txt.multiline = true; txt.text = msg_; txt.x = DEF_POINT_X; txt.y = DEF_POINT_Y; txt.width = 400; txt.height = 200; return txt; } } } Code Fullscreen Preview Fullscreen Hello TextFormatAlign.CENTER multiline height width text addChild String uint Sprite sort new page view favorite forked pv162 forked from: Say Hello. hacker_6ushzcky forked:0 favorite:0lines:46 (diff:1)