Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

actionscript format fonts

Status
Not open for further replies.

jonperks

Programmer
Nov 19, 2003
40
GB
I have an input text field and a button that changes the font, here is the code the changes the font...


Code:
typeface1.onRelease = function(){
format = new TextFormat();
format.font = "Times New Roman";
format.italic = true;
format.size = 18;
test.setTextFormat(format);
}

This changes the font allready in the input box and if i select edit an area inside of the text it carrys on writing in this font if however if i place the cursor at the end of the text in the input box it continues to output in the previous selected font, any ideas?
 
I've used the below code and it works...

Code:
_root.test.onChanged = function(){
    test.setTextFormat(format);
  }

but surely it shouldn't have to keep checking, the font only changes when a button is clicked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top