Problem with adding points to total score

I have created a simple slot machine type game and each time you press the spin button you lose 1 coin. Got that no problem. I can’t seem to figure out how to add points to total score when one of the dynamic text brings up a certain number.
I have three dynamic text fields that bring up random numbers when the spin button is pressed.
this is the script i have tried.
on (release) {
_root.total=_root.total-1;
if(_root.quote_txt==7){
_root.total=_root.total+10;
}
quote_txt is the instance name for my first text field, and total is my var for the score box.
I hope i’ve made sense of what i’m trying to do.
Please help, thanx.
kurth