# Calling a function when score hits 100?

**URL:** <https://forum.kirupa.com/t/calling-a-function-when-score-hits-100/234306>\
**Category:** flash\
**Created:** [August 1, 2007, 9:02am UTC](https://forum.kirupa.com/t/calling-a-function-when-score-hits-100/234306 "2007-08-01T09:02:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Head\_In\_A\_Pan](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@Head\_In\_A\_Pan](https://forum.kirupa.com/u/Head_In_A_Pan)\
**Post date:** [August 1, 2007, 9:02am UTC](https://forum.kirupa.com/t/calling-a-function-when-score-hits-100/234306/1 "2007-08-01T09:02:00Z")

</div>

Hey!!

I’m new to the games thing -

I’ve got a dynamic text box with the variable myScore

It’s counting up the numbers as I ‘score’.

How do I call a function when the score hits 100?

I’ve tried

```auto

if (myScore == 100){
///function do something///
}

```

And it doesn’t work -

I am keeping my score only in the text box -

Any help would be great.

🙂
