Вот класс, который я быстро создал, который вам может пригодиться:
package
{
import flash.text.TextField;
import flash.display.Bitmap;
import flash.display.BitmapData;
public class BitmapText extends Bitmap
{
// vars
private var _textf:TextField;
/**
* Draws text onto the bitmap
* @param tf The TextField to draw
*/
public function drawText(tf:TextField):void
{
_textf = tf;
bitmapData = new BitmapData(tf.width,tf.height,true);
bitmapData.draw(tf);
}
/**
* Update text
* @param t The new text
*/
public function set text(t:String):void
{
if(_textf)
{
_textf.text = t;
drawText(_textf);
}
}
}
}
И использовать этот класс:
var t:TextField = new TextField();
t.text = "some copy";
var bt:BitmapText = new BitmapText();
bt.drawText(t);
addChild(bt);
bt.text = "some new text lol";
Как видите, вы можете легко обновить текст с помощью:
BitmapText.text = "new value";