Variables for a Keypad

Sep 24, 2012

I was getting along with variables so well.  Had everything working the way I wanted. But now?  I've run into a brick wall. 

What I want to do is have a numeric keypad on screen, which, when you click a number on the keypad, will appear in a window at the top.  That's all well and good for individual numbers, but if I press a 1 and then a 2, it won't add the 2 beside the one, obviously, it will replace it. 

I've thought and thought and thought about it, and the only solution I can come up with at the moment is creating a variable for any number combination possible, which would be incredibly tedious and take eons.  Are there any other options, or should I scrap the idea?

I've done some searching on the forums here for ideas for a calculator, and I'm hoping for some other option besides finding a Flash calculator.

7 Replies
Phil Mayor

On each button 1-9, 0

You have two triggers the first multiplies your variable by ten, the second adds the value of that button to the variable.

e.g

You press 1, 1x0 (the initial value of your variable)= 0 + 1, hence the value displayed is 1

You then press 2, 1 (the current value of the variable) x 10 = 10, + 2, display shows 12

This discussion is closed. You can start a new discussion or contact Articulate Support.