Im making buttons so when it is pressed it will call a function that will present either a wrong answer text or a right answer text, it all seems correct to me but i have this pesky error. 1084: Syntax error: expecting rightparen before Button. I cant figure out where the problem is.
Here is my code. I would appreciate any and all help. Thank you.
stop();
myWelcome.text = "Hello, " + myName;
btn81.addEventListener(MouseEvent.MOUSE_UP,81Button){
function 81Button (evt:Event):void{
wrongAnswer();
}
}
btn85.addEventListener(MouseEvent.MOUSE_UP,85Button){
function 81Button (evt:Event):void{
wrongAnswer();
}
}
btn91.addEventListener(MouseEvent.MOUSE_UP,91Button){
function 91Button (evt:Event):void{
rightAnswer();
}
}
btn95.addEventListener(MouseEvent.MOUSE_UP,95Button){
function 81Button (evt:Event):void{
wrongAnswer();
}
}
function wrongAnswer (evt:Event):void{
feedback.text = "wrong";
noSound.play();
}
function yesSound (evt:Event):void{
feedback.text = "Correct";
yesSound.play();
}