Thanks to a suggestion by Peter, one of my mentors, I abandoned the idea of tapping and went with capturing the flicking gesture.
One of the problems with using a button was hiding the animation caused when the button pressed. There also was other issues. It just did not feel as natural as flicking. With flicking the code was easy. I needed to create four storyboards; a start and a stop storyboard for each horizontal direction. The ending storyboards had a start time equal to the end time of the starting storyboard. This allowed the pairs of storyboards to be chained. Handling the change of the image at the half way point was done by adding an event handler to the start storyboard to be run when it completed.
Flicking can be done in any direction, so only when the horizontal velocity was non zero and the magnitude of the horizontal velocity exceeded the magnitude of the vertical velocity did I do anything.
With a bit more playing with Blend, I should be able to change the animation from a card to a cube, but as I said I need something for version 2.
John Marshall… Visio MVP Visio.MVPs.org
One thought on “WP7 Flipping Dice – Part II”
Ya, Peter Ritchie is a great mentor! Very cool! I follow him too! :>
re flicking vs clicking
Very cool to see your app evolving! NICE! (And you too! haha) You said you have somethings for ver 2, but I can’t wait to see ver 1! Keep up the great work!
Comments are closed.