# Making a survey

**URL:** <https://forum.kirupa.com/t/making-a-survey/228177>\
**Category:** Uncategorized\
**Created:** [June 5, 2007, 9:49pm UTC](https://forum.kirupa.com/t/making-a-survey/228177 "2007-06-05T21:49:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandesign](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@brandesign](https://forum.kirupa.com/u/brandesign)\
**Post date:** [June 5, 2007, 9:49pm UTC](https://forum.kirupa.com/t/making-a-survey/228177/1 "2007-06-05T21:49:38Z")

</div>

Hi I am trying to make a simple 10 question survey on one page where the user rates whether they agree or disagree on a scale from 1 to 5. then at the end if the total is between a certain total, it gives them appropriate feedback.

I can get the feedback part to work, but I can’t seem to figure out a way to get flash to add the answers to the 10 text input fields to get a total.

I modified this code from a quiz tutorial. Then of course i would repeat it with answer2, answer3 which are the text fields:

on (release) {  
if (answer == “1”) {  
result += 1;  
}  
if (answer ==“2”){  
result +=2;  
}  
if (answer ==“3”){  
result +=3;  
}  
if (answer ==“4”){  
result +=4;  
}  
if (answer ==“5”){  
result +=5;  
}

}

at the end i have some script like this:

stop ();  
finalresult = result;  
if (finalresult\<5) {  
comment6 = "You scored "+finalresult+“You could use some work”;  
}

it doesnt seem to work, and when it does add the fields, the number is wrong. Any ideas out there?

Thanks
