Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript (http://www.flasher.ru/forum/forumdisplay.php?f=5)
-   -   как кодом менять параметры текстового поля? (http://www.flasher.ru/forum/showthread.php?t=56637)

lexneter 05.04.2004 13:05

как кодом менять параметры текстового поля?
 
Имеется:

s = new String('text_texte');
_root.createTextField("mytext", 5, 50, 50, 200, 100);

Как изменить шрифт,цвет,размер,наклон, жирность и т.п
. с помошью кода?

Dindin 05.04.2004 13:48

muTf = new TextFormat;

параметры :
TextFormat.align
TextFormat.blockIndent
TextFormat.bold
TextFormat.bullet
TextFormat.color
TextFormat.font
TextFormat.indent
TextFormat.italic
TextFormat.leading
TextFormat.leftMargin
TextFormat.rightMargin
TextFormat.size
TextFormat.tabStops
TextFormat.target
TextFormat.underline
TextFormat.url

можно задавать при инициализации:
new TextFormat([font, [size, [color, [bold, [italic, [underline, [url, [target, [align, [leftMargin, [rightMargin,[indent, [leading]]]]]]]]]]]]])

Parameters

Dindin 05.04.2004 13:52

да, и не забудь применить новый формат к тестовому полю:
TexField.setTextFormat(tf);


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

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