【发布时间】:2014-11-21 09:59:22
【问题描述】:
我正在使用 Adobe Flash 中的 IOS 应用程序...我正在尝试更改文本字段的颜色。我得到了改变文字颜色的方法
myTextP1.setTextFormat(format,0,24);
这也很完美,文本的颜色从第一个字符变为第 25 个字符......但我的问题是我需要更改附加文本的颜色..例如我的文本是“我是 Jocheved”,我我在文本后面加上“Jocheved 是个好人”所以如果我给 0 -3 那么从第一个文本开始颜色正在改变我需要更改附加文本的第一个字符而不是从头开始.. 而不是计算文本直到附加的文本是否有任何其他方法可以更改颜色。
var format:TextFormat = new TextFormat();
format.font = "Verdana";
format.color = 0xFF0000;
format.size = 23;
if(my369P==1)
{
myTextPH1.text = "Strength of Mentality"
myTextP1.text = "You have a good mind and an excellent memory. You should continue to learn and study throughout your life. You are more intellectual than emotional or practical. You may tend to look down on those who are not your intellectual equals—that could attract bad Karma!"
if(my258P==1)
{
myTextP1.appendText("\n\nStrength of Emotionality")
myTextP1.setTextFormat(format,0,24);
myTextP1.appendText("\n\nYou are compassionate, understanding and emotionally balanced. You tend to achieve your goals.");
}
}
【问题讨论】:
标签: actionscript-3 flash append adobe textfield