rendered paste bodypackage {
import flash.text.*;
public class TextObject{
public function TextObject(posX:int, posY:int, theText:String, fontColor:String, theWidth:int, fontSize:int, fontBold:Boolean){
var textFieldObject:TextField = new TextField();
textFieldObject.text = theText;
textFieldObject.width = theWidth;
textFieldObject.x = posX; textFieldObject.y = posY;
textFieldObject.selectable = false;
textFieldObject.border = false;
textFieldObject.autoSize = TextFieldAutoSize.LEFT;
var textFormat:TextFormat = new TextFormat();
textFormat.font = "Arial";
textFormat.color = 0xAA0000;
textFormat.size = 24;
textFormat.bold = true;
textFieldObject.setTextFormat(textFormat);
this.addChild(textFieldObject);
}
}
}