Keypads
 
Push Buttons:
 
Displays:
 
Jogs & Potentiometers:
 
Joystick:
 
Keypads:
 
Gauges:
 
Switches:
 
Timers:
Sliders:
Common:
 

The basic keypad component (FISKeypad) provides a group of related keys that are arranged in a grid-like format. The keypad generates two events, named keyUp and keyDown by default (but can be changed through the component parameter panel or programmatically), with values that accompany those events indicating which key was pressed and which character it corresponds to (the developer specifies an array of characters, mapping the key index to character). The developer also can specify which keys to hide in the grid, making it possible to create a more realistic arrangement of keys.

We have also provided an extension FISKeypadPlus to the basic keypad that makes the keys generate repeated events when pressed (if desired), and allows the developer to choose different key overlays. One use would be for a virtual interface that has a common set of buttons that changes labels on different screens. Below, you can see in the example below how this might be used.

At the heart of these components are arrays to hold the character mapping and the "no show" keys. With respect to mappings, the arrays are row-major ordered (i.e., <row 0, col 0>, <row 0, col 1> , <row 0, col 2>, ... <row 0, col n>, <row 1, col 0>, ...). Note also that developers need to leave space available in the arrays for each key in the grid, whether it is displayed or hidden.

The arrays are indexed from 0 to (rows*cols) -1. Movie clips in the Library > FIS Interface Components > Skins folder define what the overlays look like in their up (normal) state and in the down (pressed) state. Each frame corresponds to the key index (remember, keys that are not shown still require frames). For FISKeypadPlus, developers make the overlay movie clip with enough frames to accommodate all the overlays.

 
 

Important Note: For FISKeypadPlus, when you change the overlay graphic, keys are still referred to in events by their index from 0 to (rows*cols) -1. For example, if the label offset is 4, then FISKeypadPlus shows the graphics from frame 5 onward. However, if the user presses the key marked 4, the event comes back with num == 4, but the character being the 5th element in the character array. See the example above for a sample in action.

Developers will most likely want to change the look of the keys. This can be accomplished by changing the corresponding movie clips in the Library (Library > FIS Interface Components > Skins folder). The spacing among keys is determined by the key size. Therefore, if more spacing is necessary, the designer will need to put invisible backgrounds in the key movie clip to get the right spacing.

 
Please direct any questions or comments to components@FlashSim.com, or to our components discussion board.
 
 
All content © 2000-3 Equipment Simulations LLC
Cover Art, Logo, and Site Design by Eric Zempol for ZetaDesign