I'm developing a counter in my app that simulates a flip clock:
http://www.ladidah.com.au/range/images/flip-clock-grey.jpg
(This is what they look like).
I have buttons on either side of the clock that increase or decrease the individual integers of the counter. I imported the numbers 0-9 as bitmaps and I also imported a 'downstate' which is a single frame that makes the counter appear to 'flip'. The numbers are just panels, so they don't have downstates, so I used the button_down routine to create this effect:
When the button click routine is run, the downstate image is replaced by the image of the next number. This works well, until you accidentally call the down routine and miss the click routine. For example, if the user presses the button, and then slides their finger off the button before releasing, the image remains as the downstate. I tried to fix this by simply scrapping the click routine and using button_up. However, this causes a lot of flickering with the images.
Does anyone have any thoughts on how I could achieve this intermediate frame effect?
Thanks
http://www.ladidah.com.au/range/images/flip-clock-grey.jpg
(This is what they look like).
I have buttons on either side of the clock that increase or decrease the individual integers of the counter. I imported the numbers 0-9 as bitmaps and I also imported a 'downstate' which is a single frame that makes the counter appear to 'flip'. The numbers are just panels, so they don't have downstates, so I used the button_down routine to create this effect:
B4X:
Sub btnIncrement_Down
Dim b As Button
b = Sender
pnlInteger(b.Tag).SetBackgroundImage(bmpNumDown)
End Sub
When the button click routine is run, the downstate image is replaced by the image of the next number. This works well, until you accidentally call the down routine and miss the click routine. For example, if the user presses the button, and then slides their finger off the button before releasing, the image remains as the downstate. I tried to fix this by simply scrapping the click routine and using button_up. However, this causes a lot of flickering with the images.
Does anyone have any thoughts on how I could achieve this intermediate frame effect?
Thanks