# Very basic newb question,

**URL:** <https://forum.kirupa.com/t/very-basic-newb-question/317507>\
**Category:** flash\
**Created:** [December 23, 2010, 12:26am UTC](https://forum.kirupa.com/t/very-basic-newb-question/317507 "2010-12-23T00:26:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SunfireTYR](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@SunfireTYR](https://forum.kirupa.com/u/SunfireTYR)\
**Post date:** [December 23, 2010, 12:26am UTC](https://forum.kirupa.com/t/very-basic-newb-question/317507/1 "2010-12-23T00:26:54Z")

</div>

Hello guys, I have a simple question I would like to ask.  
I am trying to write and “if / else” statement. I want to take the user to a certain frame “prep” if the average of their three scores are below 90. However, whenever i click the button that should launch the function, it takes me to the “prep” frame regardless of the numbers i enter. hell, i dont even have to enter any numbers and it takes me there. don’t know what’s wrong?  
Thanks.

Here’s the code. There are no naming issues.

```auto
stop();

var userName:String;
var userClass:String;
var userScore1:Number;  
var userScore2:Number;
var userScore3:Number; 

userName= name_txt.text;
userClass= class_txt.text;
userScore1= Number(score1_txt.text)  
userScore2= Number(score2_txt.text)
userScore3= Number(score3_txt.text)

name_txt.text="";
class_txt.text="";
score1_txt.text="";
score2_txt.text="";
score3_txt.text="";

function showResults(event:MouseEvent):void
{

  var totalScore:Number = userScore1 + userScore2 + userScore3;

  if ( (totalScore/3) < 90 )
  {
      gotoAndStop("Prep");
  }
  else
  {
      gotoAndStop("Honors");
  }
}

btnEnter.addEventListener(MouseEvent.CLICK, showResults)

```
