Show incorrect answer even answer it correctly
hai, this is my code. everytime i answer correct answer which is "oksigen" it will show inccorect alert, but if i change from if(input1.text == "oksigen") to if(input1.text = "oksigen") then i will shpw the correct alert. why this happen? i already recheck all the instance name and everything just fine. Please help. Thank you.
stop();
import flash.events.MouseEvent
btnSemak01.addEventListener(MouseEvent.CLICK, bilaKlik);
function bilaKlik(event:MouseEvent): void
{
if(input1.text == "oksigen")
{
jawapanPelajar1.text = "congratulation, your answer is correct";
}
else
{
jawapanPelajar1.text = "sorry, please try again";
}
}
