Student Question
Hello all,
Please forgive my ignorance, from the start. I'm swimming in deep water, for me.
I have a quiz, set by the professor. Its a basic OddEven problem. He's set the parameters of what has to happen. There are only two boxes and one calculate button.
My text input box has the instance name: thenumber_txt
My dynamic box has the instance name: feedback_txt
My button has the name: compute_btn
When testing the movie I get the complier error 1180 in line 15 of this script:
compute_btn.addEventListener(MouseEvent.CLICK, calculatethenumber);
function calculatethenumber(event:MouseEvent):void
{
var thenumber:Number;
var thenumber = number(thenumber_txt.text); (line 15)
if (thenumber % 2 == 0)
{
feedback_txt.text = thenumber + " is even";
}
else
{
feedback_txt.text = thenumber + " is odd";
}
// Start your custom code
// This example code displays the words "Mouse clicked" in the Output panel.
trace("Mouse clicked");
// End your custom code
}
This is as far as I've gotten. You can tell I'm not a coder.
Can anyone help me?
I thank you for any help I can get.