Help with defining a function to increase or decrease a number

Situation:

  1. The are two buttons
  2. If you click the first one a number is increaded by 1
  3. If you click the second one the same number gets decreased by 1
  4. For each there is an IF statement which starts a certain action

I can’t figure out how to make this work. The following script returns only one number and thus starts only on action:

function ClipSelector(i:Number):Number {
i++;
return i;
}
var nDummyVar:Number = 0;
var nSelectorValue:Number = ClipSelector(nDummyVar);
if (nSelectorValue == 1) {
trace(“blah”);
}
else if (nSelectorValue == 1) {
trace(“blah”);
}
//output: bla

BTW there is second button in this script but i need to include too