私はプロジェクトに取り組んでおり、5つの画像が連続しています。これらの画像は、if、if else、elseステートメントの結果に基づいて変更する必要があります(赤、黄、緑)。私はそれを行うJavaScriptをいくつか持っていますが、Flex4.6で使用するためにActionScript3で必要です。JavaScript-- VV
if ((billableMonthHours/targetMTD) >= 1)
{
MTDstatus.src = "green_led.png";
}
else if (((billableMonthHours/targetMTD) < 1) && ((billableMonthHours/targetMTD) >= 0.95))
{
MTDstatus.src = "yellow_led.png";
}
else //if ((billableMonthHours/targetMTD) < 0.95)
{
MTDstatus.src = "red_led.png";
}
if ((billableQuarterHours/targetQTD) >= 1)
{
QTDstatus.src = "green_led.png";
}
else if (((billableQuarterHours/targetQTD) < 1) && ((billableQuarterHours/targetQTD) >= 0.95))
{
QTDstatus.src = "yellow_led.png";
}
else //if ((billableQuarterHours/targetQTD) < 0.95)
{
QTDstatus.src = "red_led.png";
}
if ((totalRecordedHours-mtdWorkingHours) >= 0)
{
UTDcards.src = "green_led.png";
}
else if (((totalRecordedHours-mtdWorkingHours) >= -4) && ((totalRecordedHours-mtdWorkingHours) < 0))
{
UTDcards.src = "yellow_led.png";
}
else //if ((totalRecordedHours-mtdWorkingHours) < -4)
{
UTDcards.src = "red_led.png";
}
おかげで、私はJavaScriptとFlexの両方に不慣れです。