import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.text.TextField;

var tf: TextField = new TextField();
tf.text = "bitmap
 text";

var myBitmapData: BitmapData = new BitmapData(80,
	20);
myBitmapData.draw(tf);
var bmp: Bitmap = new Bitmap(myBitmapData);
this.addChild(bmp);
bmp.x = stage.stageWidth / 2 -
	bmp.width / 2;
bmp.y = stage.stageHeight / 2 -
	bmp.height / 2;

  

posted on 2020-03-19 15:33  我是cdt  阅读(349)  评论(0编辑  收藏  举报