Wednesday, August 13, 2008

dynamic text fields part II

just got back from a six week holiday, so was wondering if i'd lost my mind while i was away...

steps to recreate weird problem:

1. set up two dynamic text boxes on the stage - one bold and one not bold - both with letter spacing of 1.(hint at solution) give them instance names - text1 and text2
2. set their text attributes in actionscript eg.
text1.text="hello";
text2.text="there";

3. run out - notice that neither text box is bold.

for some bizarre reason, giving the text box a letter spacing value!=0 means that it loses its formatting when you set its text value.

to resolve either set letter spacing to 0, or follow my earlier post in setting text with a letter spacing value.