# Question about displaying text based on conditional

**URL:** <https://forum.kirupa.com/t/question-about-displaying-text-based-on-conditional/308659>\
**Category:** flash\
**Created:** [April 27, 2010, 10:15pm UTC](https://forum.kirupa.com/t/question-about-displaying-text-based-on-conditional/308659 "2010-04-27T22:15:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webguync](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/webguync/32/2434_2.png) [@webguync](https://forum.kirupa.com/u/webguync)\
**Post date:** [April 27, 2010, 10:15pm UTC](https://forum.kirupa.com/t/question-about-displaying-text-based-on-conditional/308659/1 "2010-04-27T22:15:30Z")

</div>

This is a two part question.

Question 1

I want to display text based on what is resolved within this part

```auto

feedback.htmlText +="<font color='#fc0c33'>Your score is "+Math.round(score*100)+"%</font>."

```

so it would be

```auto

if "+Math.round(score*100)+"% > 80 {
"you passed"

}
 else {
"you failed"
}

```

I know this is not right, but this is what I am trying to do. Have always done this in PHP previously, not AS3.

second gotcha is I am already using an else if to display the message window with which I want to place this conditional.

```auto

else if (type == "success") {
                feedback.htmlText = "Congratulations! You have completed the Nestle Nutrition Pre-Training Validation Exam.<br><br>"

                 feedback.htmlText +="<font color='#fc0c33'>Your score is "+Math.round(score*100)+"%</font>."
                
                feedback.setTextFormat(format);
                addChild(feedback);

```

so I don’t know if you can place and if else within an elseif, or how I can I accomplish this. Any assistance would be greatly appreciated.
