-
Flash pong help
So I'm creating a flash version of pong, and the scene happens to use two balls, and two paddles. My problem is this: when the enemies ball contacts the players paddle, it seems to drag, sometimes all the way to the bottom of the paddle, before reversing its xspeed and changing directions. Can anybody think of any reason the hittest might be delaying? I also find it strange that the ball doesn't continue along it's x, there are no lines of code involving a zeroed out x speed.
-
When a Hit occurs - before reversing the direction try subtracting a pixel or 2 from _y and see if that helps ... whats happening is the hitTest probably remains true for a few onEnterFrames ... make sure that isnt the case ... hard to say anything else without seeing your code
-
Thanks for the reply, you're right that's exactly what the problem was. I figured out that when the balls travel too slow they tend to stick to the paddle, anything over 10pixels per frame seems to work fine.
But I've run into a new problem... All the buttons in my movie are sending the game back to Scene 1, you can imagine why that's frustrating. I refer to _root.gotoAndPlay([say 11 for example]) and instead of sending it to frame 11 on the current scene, it reverts back to scene 1, and I'm pretty sure it's continuing from scene 1's frame 11 instead.