all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

Line spacing in textArea component


Line spacing in textArea component mpac-2
12/1/2004 11:32:57 PM
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
Re: Line spacing in textArea component adireddy
12/2/2004 6:24:39 AM
You can use "newline" property to set a line spacing in TextArea component.

Re: Line spacing in textArea component J_o_h_n_n_y
12/2/2004 7:02:53 AM
He was asking about the spacing between the lines, not how to add a new line.

Re: Line spacing in textArea component mpac-2
12/2/2004 9:29:21 AM
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.
Re: Line spacing in textArea component &y
12/2/2004 9:55:52 AM
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
Re: Line spacing in textArea component mpac-2
12/2/2004 4:19:19 PM
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:(
Re: Line spacing in textArea component mpac-2
12/2/2004 4:49:55 PM
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.
AddThis Social Bookmark Button