Wednesday, December 24, 2014

Work in Progress (button user experience)

After i create the button for to move the object left and right . but every move need to press the button once which make the game very hard to control so i research on how to make the button detect on hold when the button click is on hold the object can keep moving. My tutor share a tutorial with about using initial which is normally use for time event. at this section we are using time to detect the button is onhold or onclick. so when onhold the digi will continue increase and decrease.


This is an example video of the code work.


There is a difference between this code and my code. The example is direct sending the data in the same html but for my situation i will need to make the button when onhold will continuously sending the same data which i still working to solve it. beside this, onhold doesn't work for mobile device since most of the device is touch screen which is another section i need to solve to finish the games. Hopefully my next blog entry i am able to share how i solve all this problems.

References

Stackoverflow.com, (2014). How do I implement press and hold button javascript?. [online] Available at: http://stackoverflow.com/questions/702165/how-do-i-implement-press-and-hold-button-javascript [Accessed 24 Dec. 2014].


No comments:

Post a Comment