-1

我正在尝试动态更改 Flash html5 画布项目中的字体颜色。Log_file 是我的文本框名称。这就是您在 actionscript 中使用的方式。

this.Logger.Log_File.htmlText = "<font color='#ff0000' size='-1'>"+myvar+"</font><BR>"+this.Logger.Log_File.htmlText;

知道我做错了什么吗?javascript 不支持 htmltext 吗?

4

2 回答 2

0

您不能<font>在 HTML5 中使用,请改用 CSS。

this.Logger.Log_File.htmlText = "<p style="color:#ff0000">"+myvar+"</p><br>"+this.Logger.Log_File.htmlText;
于 2015-03-31T20:52:14.877 回答
-1

你可以这样试试:

elementoDad.elementoSon.children[0].graphics._fill.style = "#ff00ff";

这是一个工作示例:

ex1.teste.children[0].graphics._fill.style = "#ff00ff";
于 2017-12-13T15:50:52.670 回答