0
var PlayerScore:TextField = new TextField();
//Here we add the new textfield instance to the stage with addchild()
_canvas.addChild(PlayerScore);
var myFormat:TextFormat = new TextFormat();
myFormat.size = 30;
PlayerScore.defaultTextFormat = myFormat;
PlayerScore.text = _player_score.toString();
PlayerScore.width = 250;
PlayerScore.x = 70;
PlayerScore.y = -20;
PlayerScore.textColor = 0xFFFFFF;
我在构造函数中使用这个访问影片剪辑中的另一种方法
我如何使用
PlayerScore.text = _player_score.toString();
在另一种方法?
你是什么意思的“使用”?你的意思是如何从其他方法/类设置文本? – Eugeny89 2012-02-22 11:22:37
你可以使它成为一个静态变量 – Summer 2012-02-22 23:51:59
“你的意思是如何设置其他方法/类的文本?”是 – John 2012-02-23 13:46:18