Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
trainh13
Posts: 7
Registered: ‎06-27-2009
My Device: Not Specified

stupid question about the accelerometer.

I've been working on an app. What i need it to do is perform an animation when when the storm is moved fast sideways and foreward. I've read all the tutorials and everything on it, but i just don't seem to understand it. I also looked at the sample app, but still i see how to make an object interact with the accelerometer freely like the ball, but i don't see how to make it perform an animation. The answer may be in front of my face, but i'm just not used to the accelerometer stuff. I may have figured out the touch part. Also need help with a UI that will help you change the color of an object and form of an object. I know this is probably easy stuff, but I'm learning Blackberry Java on my own, because I just don't have much money for school right now. I'm absorbing tutorials like crazy, but some stuff I still don't understand.
Please use plain text.
Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: stupid question about the accelerometer.

[ Edited ]
The accelerometer only measures the force of gravity it can't tell you speed specifics on its own. Theoretically, only rotation and back and forth motion should change the force of gravity, so motion in a straight line won't be extremely useful. To perform an animation you just need to cycle through a set of images. It would probably be better to base the speed of the animation on the degree of tilt, instead of speed of motion.
Message Edited by CMY on 07-05-2009 09:23 PM
Please use plain text.