Today i start to explode the coding part of my application. So i go online to search some tutorial to learn how to program Accelerometer.
First i need to understand what is Accelerometer. To explain in a simple like is "The accelerometer is a built-in electronic component that measures tilt and motion. It is also capable of detecting rotation and motion gestures such as swinging or shaking."
I found a few of research The first link i found is
http://www.republicofcode.com/tutorials/flash/as3accelerometer/
but while i am exploring it i found the version that was shown in the web is no similar to what i downloaded in my computer. So i have a quite scroll to check out more i find out i cannot really follow this tutorial. So i continue my research online to find another tutorial.
After some research i found this youtube tutorial that teach user to create a pinball game by using accelerometer.
In this tutorial, we start to learn how to track down the data of accelerometer collected. Accelerometer are able to sense x, y and z in dept. So by tracking down the code we are able to use the code to make the pinball.
In the youtube tutorial, it have a tutorial link for people to visit to tutorial homepage and in the homepage it provide the code that he use in the tutorial
http://cartoonsmartblog.wordpress.com/2010/12/02/free-accelerometer-tutorial-with-actionscript-3-flash-cs5-and-device-central/
After watching the video, i start my flash to try out the code the are given.
first i create a template the look like a map.
After i finish the code i try to change the instant name first. and before the i try to trace the accelerometer x and y.
These are the code i will be using to trigger the movement of map.
And below is the outcome of my learning . I learn how to trigger the accelerometer and how it link to trigger the map.
No comments:
Post a Comment