flash on 2010-1-14
♥0 |
Line 22 |
Modified 2010-01-14 11:37:45 |
MIT License
archived:2017-03-20 15:12:27
ActionScript3 source code
/**
* Copyright hacker_yk666qry ( http://wonderfl.net/user/hacker_yk666qry )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/73jp
*/
package {
import flash.text.*;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var _format:TextFormat = new TextFormat();
_format.size = 20;
_format.align = TextFormatAlign.LEFT;
var tf:TextField = new TextField();
tf.defaultTextFormat = _format;
tf.text = "電球「俺切れたら周りと\nか見えなくなるタイプだから」";
tf.border = true;
tf.multiline = false;
tf.wordWrap = false;
tf.width = stage.stageWidth - 50;
tf.autoSize = TextFieldAutoSize.CENTER;
tf.x = (stage.stageWidth - tf.width) / 2;
tf.y = (stage.stageHeight - tf.height) / 2;
addChild(tf);
}
}
}