PDA

Просмотр полной версии : CSS in Flash


Mr. Fixit
18.09.2007, 12:03
var styles:TextField.StyleSheet = new TextField.StyleSheet ();

styles.setStyle ("html", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0066CC'});
test_txt.html = true;
test_txt.styleSheet = styles;

вообще никакой реакции со стороны ткстФилда, почему?:wacko:

etc
18.09.2007, 12:43
А какая должна быть реакция? Текст не присвоен, htmlText тоже и тега <html> нету.

Mr. Fixit
18.09.2007, 13:02
var styles:TextField.StyleSheet = new TextField.StyleSheet ();

styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0066CC'});

test_txt.html = true;
test_txt.htmlText = "<b> this is bold text </b>";
test_txt.styleSheet = styles;

и че?

Molecula
18.09.2007, 13:07
Я вот так писал:
var styleObj:TextField.StyleSheet = new TextField.StyleSheet();
styleObj.onLoad = function(success:Boolean) {
if (success) {
tt.styleSheet = styleObj;
}
};
styleObj.load("css/flash.css");

createTextField("tt", 0, 0, 9, 290, 312);
tt.html=true;
tt.multiline = true;
tt.wordWrap = true;
tt.autoSize = true;
tt.antiAliasType = "advanced";
tt.styleSheet = styleObj;

Mr. Fixit
18.09.2007, 13:10
тут речь идет о создании новых стилей в коде AS.
Не пойму в чем фигня?((

Molecula
18.09.2007, 13:24
Раз в коде, тогда не то, я думал хотите задавать стиль текста из внешнего CSS-файла.

Kikasso
18.09.2007, 13:39
test_txt.htmlText = "this is <html> html </html>text";

etc
18.09.2007, 13:45
var styles:TextField.StyleSheet = new TextField.StyleSheet ();

styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0066CC'});

test_txt.html = true;
test_txt.htmlText = "<html> this is bold text </html>";
test_txt.styleSheet = styles;

Mr. Fixit
18.09.2007, 13:58
вообще 0 реакции!!
перезагружал комп. все тоже самое

etc
18.09.2007, 14:19
Исходник тогда на бочку.

Mr. Fixit
18.09.2007, 14:37
хорошо, но различия вы не увидите..

etc
18.09.2007, 14:55
Поменяй две последние строчки местами.