Displaying image based on four toggles

I'm sure this is obvious, but I'm missing the boat here. So I am asking for some advice on this project.I have a series of 16 images. The user can choose four different toggles to display one of the 16 images. Ideally, I would have a variable from 0-15. The four toggles add to this variable as follows:blnA is true then intA = +1blnB is true then intB = +2blnC is true then intC = +4blnD is true then intD = +8intTotal = intA + intB + intC + intDSo, all four of these values combine to give 15 different outcomes (plus the empty state of 0, 0, 0, 0). The easiest route would be to have four check boxes. If Box A, C, and D are checked, then the final value is 1+4+8. The problem is that I want to tie these values to keystrokes. So, if someone presses A, then the value either adds 1 or subtracts 1. It depends on whether blnA is true or not. I'm just not sure how to use the toggle. I'd like to have the project to do the following when B is pressed:Check the state of blnBIf blnB is True, then intB = 0 (which would subtract 2)If blnB is false, then intB = 2 (which would add 2)Calculate the variable with intTotal = intA + intB + intC + intDI hope this makes sense. I know how I want to present this, but I'm stymied in my attempt to cobble this together in my project.KevinEdited By: Kevin Elmore on 2007-3-12 13:44:44

Discussions have been disabled for this post