0
for(var temp:int = 0;temp<recipeNum;temp++)
{
if ((temp == 1) || (temp == 2) || (temp == 6) || (temp == 9))
{
textRecipe.textColor = 0x0000FF;
}
else
{
textRecipe.textColor = 0x000000;
}
textRecipe.text += "\n" + recipe[temp];
addChild(textRecipe);
}
该代码的问题屏幕上的所有文字都是黑色的。我想临时1,2,6,9是蓝色的,任何解决方案。如果语句改变文字颜色