createTextField
okidoki:
-------------------------------------------------------
loadVariables("dat/textdatei.txt", _level0);
_root.onData = function(){
//Abstand in Pixel zwischen den Textfeldern
abst = 10;
//Textformat festlegen
formatxt = new TextFormat();
formatxt.size = 18;
formatxt.font = "Bauhaus";
formatxt.color = "0xff0066";
//erstes Textfeld generieren + formatieren
_root.createTextField("txt1", 1, 0, 0, 200, 500);
_root.txt1.type = "dynamic";
_root.txt1.variable = "txt1_1";
_root.txt1.embedFonts = true;
_root.txt1.selectable = false;
_root.txt1.multiline = true;
_root.txt1.wordWrap = true;
_root.txt1.autoSize = true;
_root.txt1.border = true;
_root.txt1.setTextFormat(formatxt);
//zweites Textfeld generieren + formatieren
_root.createTextField("txt2", 0, 0, (_root.txt1.textHeight + abst), 200, 500);
_root.txt2.type = "dynamic";
_root.txt2.variable = "txt1_2";
_root.txt2.embedFonts = true;
_root.txt2.selectable = false;
_root.txt2.multiline = true;
_root.txt2.wordWrap = true;
_root.txt2.autoSize = true;
_root.txt2.border = true;
_root.txt2.setTextFormat(formatxt);
//drittes Textfeld generieren + formatieren
_root.createTextField("txt3", 2, 0, (_root.txt1.textHeight + _root.txt2.textHeight + abst*2), 200, 500);
_root.txt3.type = "dynamic";
_root.txt3.variable = "txt1_3";
_root.txt3.embedFonts = true;
_root.txt3.selectable = false;
_root.txt3.multiline = true;
_root.txt3.wordWrap = true;
_root.txt3.autoSize = true;
_root.txt3.border = true;
_root.txt3.setTextFormat(formatxt);
trace (_root.txt2.textHeight);
}
---------------------------
Greetz,
EdMan
|