Help With Changing Variable

Okay I need a button to change the value of a variable…

This is the code to define the variable:

var numOfBalls:Number = 10;

And this is the code i currently have for the button (that doesn’t work):

on (release) {
 _root.numOfBalls+=1;
}

I need the button (named ‘addOne’) to add 1 to the variable (10 to 11, 11 to 12) and i also need another button to decrease the variable by 1 (12 to 11, 11 to 10) but the one which adds should only be able to add until the variable reaches 20, and decrease should go until 1.

Any help appreciated
-Adam