Hey all,
I’ve been working on a project for a while now and the thing that has kept bugging me is that my score has a really hard time staying in the center of the screen. This code:
private var textObj:Text
public function ScoreBox()
{
Text.font = "My-Font"
textObj = new Text(Global.score.toString())
textObj.scale = 2
textObj.align = "center"
textObj.centerOO();
x = FP.halfWidth
y = FP.halfHeight
graphic = textObj;
}
override public function update():void
{
textObj.text = Global.score.toString();
}
Produces this:
(notice the off center number in the center) This isn’t even the most egregious of off-centering, as the text gets into triple digits it moves all the way to the right.
Basically all I want to know is why this is happening / how can I fix it?
Thanks, Taylor Anderson