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是藍色的,任何解決方案。如果語句改變文字顏色