Ping Pong - Ball Movement
| Category | : Flash | Views | : 34314 | ||
| Version | : 8 | Rating | : | ||
| Type | : Text | Source File | : ping-pong-ball-movement.zip | ||
| Result | : See the result | ||||
| Index Series | Next >>> |
For the first part in developing a pong game we are going to make the ball move and bounce.
Create a new document; give it a black background and the size 200x300:

Now let's create some Movie Clip's. One should be named "Pad".
We will use the same Movie Clip for both pads; their action will be put inside the instances.
1- It should look close to this:

2- Create the "Wall" Movie Clip, this is the limit for the ball to bounce:

3- Create another Movie Clip called "Pads", inside place 2 instances of the "Pad" Movie Clip:

To the top one you give the instance name of "Opponent" and the other "Player".
4- Inside another Movie Clip named "Limits" place "Pads" and "Wall"

Pads' instance name should be "Pads" and Wall's instance named "Border".
We put the Wall and Pads inside the same Movie Clip, to use it to know when the ball collided. And we couldn't put everything together because the ball behaves different if hits the Wall instead of the Pads.
Now place the Limit Movie Clip inside the main timeline, instance name "Limits":

![]() |
![]() |
![]() |
![]() |
![]() |
| Index Series | Next >>> |






