Say Hello.
developer madflash
♥0 |
Line 36 |
Modified 2010-03-17 17:01:17 |
MIT License
archived:2017-03-20 02:44:49
ActionScript3 source code
/**
* Copyright madflash ( http://wonderfl.net/user/madflash )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ycrk
*/
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;
}
}
}