# Score in FlashMX

**URL:** <https://forum.kirupa.com/t/score-in-flashmx/216494>\
**Category:** flash\
**Created:** [February 17, 2007, 1:17am UTC](https://forum.kirupa.com/t/score-in-flashmx/216494 "2007-02-17T01:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ninjapoop](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@Ninjapoop](https://forum.kirupa.com/u/Ninjapoop)\
**Post date:** [February 17, 2007, 1:17am UTC](https://forum.kirupa.com/t/score-in-flashmx/216494/1 "2007-02-17T01:17:55Z")

</div>

I need some help with my score counter in a game im making. Whenever you  
rollover a object with another, it gives me a score of NaN? instead of a number.  
Heres my score actionscript

" \_root.total = \_root.total + 100;"

And here is the full code.

onClipEvent (enterFrame) {  
if (\_root.punchbg, hitTest(\_root.ball)) {  
\_root.punchbg =\_alpha = 10  
mysound = new Sound();  
mysound.attachSound(“Scrbar”);  
mysound.start()  
\_root.total = \_root.total + 100;  
} else {  
\_root.punchbg =\_alpha = 100

}  
}  
And i allready set the Var to total. 🔗
