Mx 2004 number increment / decrement on button press

Hi all, I’ve used the very basics on flash on and off for quite a while such as shape tween, motion tween, layers etc and am wanting to progress things a bit.

I am looking into developing an application that uses code for number increment / decrement upon up and down button click.
I’ve had a look around the web and for tutorials, especially on flash kit tutorial site and searching but don’t seem to find quite what I require.

One example is as follows http://www.crickweb.co.uk/assets/res…hp?&file=fmach

Perhaps a better example is http://www.numbergym.co.uk/NP13swf/N…tionsExpl.html
which takes things to the next level which I’m also looking to do so that you can click up or down, the number increment / decrements and there is also a visual indication of the count as well (like building blocks).

I have an idea that the the bit displaying the current number possibly uses a dynamic text box.The initial number may be stored within a variable and then for up or down the action script code is along the lines of variable = variable +1 and variable = variable - 1 for minus etc? Can anyone offer any help on how to achieve this for both code and upon button press?

Also I’m not sure exactly how the blocks being added / removed is linked to the increase / decrease of the number being chosen or the code itself. Does anyone know of tutorials which may give me some insight into this please?

Thanks for any help,
Michael