Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 3.0 (http://www.flasher.ru/forum/forumdisplay.php?f=83)
-   -   Автоформатирование программно созданного текстового элемента (http://www.flasher.ru/forum/showthread.php?t=131968)

Vogd 01.11.2009 16:55

Автоформатирование программно созданного текстового элемента
 
Здравствуйте! Создаю текст с помощью кода:

Код AS3:

 
var fd:FontDescription = new FontDescription();
fd.fontWeight = flash.text.engine.FontWeight.BOLD;
 
var format:ElementFormat = new ElementFormat(fd);
format.fontSize = 16;
format.color = 0x000000;
format.kerning = flash.text.engine.Kerning.OFF;
format.digitCase = flash.text.engine.DigitCase.OLD_STYLE;
 
var textElement:TextElement = new TextElement(str, format);
var textBlock:TextBlock = new TextBlock();
textBlock.content = textElement;
 
var textLine1:TextLine = textBlock.createTextLine(null, 300);
addChild(textLine1);

Но он получается в одну строчку. Можно ли как-то сделать, чтобы текст форматировался?


Часовой пояс GMT +4, время: 16:54.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.