flash actionscript:
OK, there is a simple way to set line spacing in textItem class. You just have to clik on format button in properties and set the line spacing in Format Options. Is there a way to set line spacing in textArea component. I tried everything and didn't find a solution to this problem.:Q
You can use "newline" property to set a line spacing in TextArea component.
He was asking about the spacing between the lines, not how to add a new line.
That's right J_o_h_n_n_y. I managed to set margins, indent, background ... but it seems like line spacing is impossible to set, which is really wierd.
Hi, Line spacing is usually called 'leading' (since traditionally this was done using strips of lead in between each line). This can be done in Flash - have a look at TextFormat.leading in Help. &y
i tried to get a reference for my TextArea component TextFormat object (myTextArea.getTextFormat()) but it returned undefined. the problem is textArea component uses style sheet to format text, so i guess the question is still open (or i might be wrong). well, if nothing helps, will have to switch textarea component with textfield and do some adjustements to my script:(
i found a solution to this problem but it still doesn't fit my needs. here's a sample, in case if someone's interested(thanks to &y for giving me a hint): var fmt:TextFormat = new TextFormat(); fmt=mytextarea.label.getTextFormat(); fmt.leading=20; mytextarea.label.setNewTextFormat(fmt); the problem is, when i set leading to 0 , line space is still too big. i tried to set it to negative value, but it did nothing.
Don't see what you're looking for? Try a search.
|