Text box disappears after flipping a movieclip?
As title says, the textbox which was created in a function disappears after being flipped (scaleX = -1). Is there any way to fix it? The textbox contains the value of health, and it belongs to an Enemy unit. When the enemy unit turns to face another direction, the textbox disappears.
Here's my function.
private function draw():void
{
healthTxt = new TextField();
healthTxt.defaultTextFormat = new TextFormat("Rockwell", 15, 0xFF0000, 1)
healthTxt.height = 20;
healthTxt.width = 20;
healthTxt.x = -10;
healthTxt.y = -28;
healthTxt.text = health + "";
addChild(healthTxt);
;
}
Everything was instantiated properly. Any help would be appreciated. Thanks!
