PDA

View Full Version : font dynamic text


unclewilco
08-27-2003, 05:00 AM
getting myself in a fix.....basic but just can't get it..
help!!!



loadText = new loadVars();
loadText.load("date.txt");
loadText.onLoad = function() {
myDynamicText.text = loadText;
};


_root.createTextField("myDynamicText",2,-5,0,150,20);
_root["myDynamicText"].border = true;
_root["myDynamicText"].html = true;

_root["myDynamicText"].myformat = new TextFormat();
_root["myDynamicText"].myformat.color = ff0000;
_root["myDynamicText"].myformat.bullet = false;
_root["myDynamicText"].myformat.underline = true;
_root["myDynamicText"].setTextFormat(myformat);


cheer wilco

farafiro
08-27-2003, 05:12 AM
unclewilco
welcome to the forums

just u need to add this myDynamicText.text = this.loadText

unclewilco
08-27-2003, 05:17 AM
thanks

sorry i was not clear at ALLLL, the text works.. and appears in the created TextField

but i can't get it to set the font format.

cheers

farafiro
08-27-2003, 05:29 AM
ah, ok sorry

_root.createTextField("myDynamicText",2,-5,0,150,20);
myDynamicText.border = true;
myDynamicText.html = true;

myformat = new TextFormat();
myformat.color = 0xff0000; //the color code was wrong
myformat.bullet = false;
myformat.underline = true;
myDynamicText.setTextFormat(myformat);

unclewilco
08-27-2003, 05:50 AM
cheers

wilco