Javascript 如何在flash html5画布项目中动态更改文本颜色

Javascript 如何在flash html5画布项目中动态更改文本颜色,javascript,html5-canvas,flash-cc,htmltext,Javascript,Html5 Canvas,Flash Cc,Htmltext,我正试图在flash html5画布项目中动态更改字体颜色。 日志文件是我的文本框名称。这是您在actionscript中使用的方法 this.Logger.Log_File.htmlText = "<font color='#ff0000' size='-1'>"+myvar+"</font><BR>"+this.Logger.Log_File.htmlText; this.Logger.Log\u File.htmlText=“+myvar+”“+thi

我正试图在flash html5画布项目中动态更改字体颜色。 日志文件是我的文本框名称。这是您在actionscript中使用的方法

this.Logger.Log_File.htmlText = "<font color='#ff0000' size='-1'>"+myvar+"</font><BR>"+this.Logger.Log_File.htmlText;
this.Logger.Log\u File.htmlText=“+myvar+”
“+this.Logger.Log\u File.htmlText;
知道我做错了什么吗?javascript不支持htmltext吗?

在HTML5中不能使用
,请改用CSS

this.Logger.Log_File.htmlText = "<p style="color:#ff0000">"+myvar+"</p><br>"+this.Logger.Log_File.htmlText;
this.Logger.Log_File.htmlText=“

”+myvar+”


“+this.Logger.Log_File.htmlText;
您可以这样尝试:

elementoDad.elementoSon.children[0].graphics._fill.style = "#ff00ff";
以下是一个工作示例:

ex1.teste.children[0].graphics._fill.style = "#ff00ff";

在HTML5中已经过时。我以前从来没有听说过htmlText。也许你正在寻找innerHTML而不是htmlText。我尝试了一下,但没有成功。我想知道在html5画布项目类型中,flash cc是否还支持htmltext inst。