forked from: Say Hello.
forked from Say Hello. (diff: 1)
developer madflash Say hello to all.
ActionScript3 source code
/**
* Copyright hacker_6ushzcky ( http://wonderfl.net/user/hacker_6ushzcky )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/lyuo
*/
// forked from madflash's Say Hello.
package
{
/*
* developer madflash
* Say hello to all.
*/
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;
private static const DEF_POINT_Y:uint = 100;
private static var _movement:uint = 16;
private static var _messgae:Array = new Array(
"Hello to all!",
"I'm a new user of wonderfl.",
"nice to meet you :\)"
);
public function I()
{
// for debug status
//addChild( new Stats() );
for each(var e:String in _messgae)
{
addChild( say(String(e)) );
}
}
private function say(msg_:String):TextField
{
_movement += _movement; //倍数移動仕様
var format:TextFormat = new TextFormat();
format.align = TextFormatAlign.CENTER;
format.color = 0xff0000;
format.size = 12;
format.font = 'MS Gothic';
var txt:TextField = new TextField();
txt.defaultTextFormat = format;
txt.selectable = false;
txt.text = msg_;
txt.x = DEF_POINT_X;
txt.y = DEF_POINT_Y + _movement;
txt.width = 400;
txt.height = 16;
return txt;
}
}
}
