I just got a new android phone, and I figured I’d play around with Flash on it. I am about to start learning AS3, since that’s obviously the way to go, but for now I’m messing around with AS2. The first test I wanted to do was a simple pong game. I already scripted the ball bouncing off the walls and paddle, and I scripted the paddle to set its y value equal to ymouse. Now when tested on the pc with a mouse, this works perfectly as intended. When I loaded it up on my phone, however, the paddle wouldn’t follow the area I’m touching. Every time I tap the screen it updates the position once. Sliding your finger around the screen won’t result in the paddle following it along the y axis in a smooth motion.
Could anyone nudge me in the right direction to obtain this behavior? Or is AS3 the only way to accomplish this?
Here is the snippet of code on the paddle:
onClipEvent(enterFrame) {
this._y = _root._ymouse - 45;
}
Don’t waste your time with AS2, you’ll just have to unlearn everything when you get to AS3. AS2 is to AS3 as JavaScript is to Java.
See here for working with touch events.