Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 我可以在AS3中为htmltext img标记着色吗?_Actionscript 3_Actionscript_Htmltext_Tint - Fatal编程技术网

Actionscript 3 我可以在AS3中为htmltext img标记着色吗?

Actionscript 3 我可以在AS3中为htmltext img标记着色吗?,actionscript-3,actionscript,htmltext,tint,Actionscript 3,Actionscript,Htmltext,Tint,我可以对AS3中htmlText中包含的库中的图像着色吗(使用flash cs5) 在我使用的舞台上: var cTint:Color = new Color(); cTint.setTint(0xff00ff, .25); image.transform.colorTransform = cTint; htmlText代码(cobj.img是以库作为链接名称的字符串): op.htmlText=”“; 如果没有,有没有办法用舞台上的图像来代替呢?因此,我可以创建一个图像,将其放在舞台上,然

我可以对AS3中htmlText中包含的库中的图像着色吗(使用flash cs5)

在我使用的舞台上:

var cTint:Color = new Color();
cTint.setTint(0xff00ff, .25);
image.transform.colorTransform = cTint;
htmlText代码(cobj.img是以库作为链接名称的字符串):

op.htmlText=”“;

如果没有,有没有办法用舞台上的图像来代替呢?因此,我可以创建一个图像,将其放在舞台上,然后放在htmlText中。

从该图像创建一个实例,着色并将其添加到文本中! 假设您的图像是库中的电影剪辑

var libraryImage:MovieClip = new LibraryImage();
var cTint:Color = new Color();
cTint.setTint(0xff00ff, .25);
libraryImage.transform.colorTransform = cTint;

op.htmlText = "<p> </p><img src='libraryImage' width='40' height='40' vspace='0' />";
//add empty string at the start and you dont need to concatenate the string.
var libraryImage:MovieClip=new libraryImage();
变量cTint:Color=新颜色();
cTint.setTint(0xff00ff,.25);
libraryImage.transform.colorTransform=cTint;
op.htmlText=“

”; //在开始处添加空字符串,不需要连接字符串。
从图像创建一个实例,着色并将其添加到文本中! 假设您的图像是库中的电影剪辑

var libraryImage:MovieClip = new LibraryImage();
var cTint:Color = new Color();
cTint.setTint(0xff00ff, .25);
libraryImage.transform.colorTransform = cTint;

op.htmlText = "<p> </p><img src='libraryImage' width='40' height='40' vspace='0' />";
//add empty string at the start and you dont need to concatenate the string.
var libraryImage:MovieClip=new libraryImage();
变量cTint:Color=新颜色();
cTint.setTint(0xff00ff,.25);
libraryImage.transform.colorTransform=cTint;
op.htmlText=“

”; //在开始处添加空字符串,不需要连接字符串。
谢谢,我也找到了另一种方法。显然,您可以通过设置图像的id,然后通过op.getImageReference(“imgid”)检索图像对象;然后在那个物体上设置颜色转换。谢谢,我也找到了另一种方法。显然,您可以通过设置图像的id,然后通过op.getImageReference(“imgid”)检索图像对象;然后在该对象上设置ColorTransfer。