Returning a value from a mouse event?

Hello all,

This seems simple to do yet I can not find the right way to do it. I have a button here’s the code:

    public function goForward(event:MouseEvent):void{
            s++;
        if (s == xmlData.Player.length()){
            s = 0;
        }

      }

Now all I want to do is have this function return a number so I can set up a new variable. I know I need to replace the “void” with “Number” data type and use “return” in the function. But I just can’t find the right way to write the code. “s” is initially set to zero so basically all I want is when “s” increments up, it changes the new variable as well( call it newNum if you want) Any and all help is greatly appreciated. Thank you.