# \[FMX04\]Random Quiz Sound Effects Actionscript

**URL:** <https://forum.kirupa.com/t/fmx04-random-quiz-sound-effects-actionscript/250377>\
**Category:** flash\
**Created:** [January 29, 2008, 2:55am UTC](https://forum.kirupa.com/t/fmx04-random-quiz-sound-effects-actionscript/250377 "2008-01-29T02:55:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zizi](https://avatars.discourse-cdn.com/v4/letter/z/a698b9/32.png) [@Zizi](https://forum.kirupa.com/u/Zizi)\
**Post date:** [January 29, 2008, 2:55am UTC](https://forum.kirupa.com/t/fmx04-random-quiz-sound-effects-actionscript/250377/1 "2008-01-29T02:55:55Z")

</div>

I’m trying to figure how you add correct & wrong sound effects into buttons of a “Who want’s to be a Millionare?” as well as correct & wrong symbols popping up using actionacript.  
Thanks, much appriciated.

All I got so far is this particular area in the frame with questions & answers already scrited in etc, hope this helps.

> 

//BUTTON PRESS  
\_root.Button1\_btn.onRelease = function() {  
if ((\_root.AwaitingAnswer == 1) and (\_root.QuestionNumber\<\>10) and (\_root.AnswerGiven\<\>1) and (\_root.EndTheQuiz\<\>1)) {  
\_root.PickedAnswer = 1;  
if (\_root.RightAnswer == \_root.PickedAnswer) {  
MoneyGoesUp()  
} else {  
WrongAnswer()  
}  
};  
\_root.Button2\_btn.onRelease = function() {  
if ((\_root.AwaitingAnswer == 1) and (\_root.QuestionNumber\<\>10) and (\_root.AnswerGiven\<\>1) and (\_root.EndTheQuiz\<\>1)) {  
\_root.PickedAnswer = 2;  
if (\_root.RightAnswer == \_root.PickedAnswer) {  
MoneyGoesUp();  
} else {  
WrongAnswer();  
}  
}  
};  
\_root.Button3\_btn.onRelease = function() {  
if ((\_root.AwaitingAnswer == 1) and (\_root.QuestionNumber\<\>10) and (\_root.AnswerGiven\<\>1) and (\_root.EndTheQuiz\<\>1)) {  
\_root.PickedAnswer = 3;  
if (\_root.RightAnswer == \_root.PickedAnswer) {  
MoneyGoesUp();  
} else {  
WrongAnswer();  
}  
}  
};  
\_root.Button4\_btn.onRelease = function() {  
if ((\_root.AwaitingAnswer == 1) and (\_root.QuestionNumber\<\>10) and (\_root.AnswerGiven\<\>1) and (\_root.EndTheQuiz\<\>1)) {  
\_root.PickedAnswer = 4;  
if (\_root.RightAnswer == \_root.PickedAnswer) {  
MoneyGoesUp();  
} else {  
WrongAnswer();  
}  
}  
};  
//MONEYGOESUP  
function MoneyGoesUp() {  
if (\_root.QuestionNumber\<\>10) {  
\_root.QuestionNumber += 1;  
\_root.Question = “CORRECT! Next question… (Press SPACE)”;  
\_root.AnswerGiven = 1;

if (\_root.QuestionNumber == 10) {  
\_root.Money = “£1,000,000”;  
\_root.Question = “CONGRADULATIONS”;  
\_root.Answer1 = “”;  
\_root.Answer2 = “”;  
\_root.Answer3 = “”;  
\_root.Answer4 = “”;  
}  
//WRONG ANSWER  
function WrongAnswer() {  
Money = 0;  
\_root.Question = “Sorry, wrong answer. Try another answer.”;  
\_root.QuestionNumber\<\>10;
