
TextFormat.bullet Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
892
|
ActionScript Language Reference
TextFormat.bullet Property
specifies whether to add bullets to paragraphs
Flash 6
read/write
theFormat.bullet
Description
The Boolean bullet property can create a bulleted list (equivalent to HTML’s <UL> tag)
from the paragraphs in a text field. When
bullet is true, the first line of each formatted
paragraph (any span of text ending with a line break character) starts with a small circle
icon and is indented. If automatic word-wrapping is enabled for the text field, subsequent
lines in the paragraph are also indented, provided that they fall within the range of the
format. The circular bullet symbol cannot be customized. Nested bulleted lists are not
supported.
To convert an entire text field into a bulleted list, invoke TextField.setTextFormat() without
specifying any index arguments:
this.createTextField("theField_txt", 1, 0, 0, 200, 60);
theField_txt.border = true;
theField_txt.text = "Item one.\nItem two.\nItem three."
// Create a TextFormat object
format = new TextFormat();
format.bullet = true;
// Make the whole field bulleted
theField_txt.setTextFormat(format);
To add a bullet to the first paragraph in a text field, apply the format to the character at
index 0:
theField_txt.setTextFormat(0, format);
To add a bullet to any subsequent ...