I have created a multiplayer version of pong now i want to make a single player version with AI for the 2nd paddle to function.

The computers paddle movieclip is called paddle2
The ball movieclip is called ball
and the stage size is set to 1024*768px

How could i make the comuters paddle follow the y position of the ball so it can return the ball?

I also want to do some more advanced code so the ball will be more random when it hits the paddle. Also the computer needs some kind of random function on the y axis so player 1 has the ability to beat the computer.
(Maybe when the xspeed of the ball reaches a certain speed the computer starts being more random. DUNNO???)

If anyone can atleast help me with the code above that would be great. Because I was also interested to know how you can tweak the code above so that the compuer is more difficult to beat, so i can have a difficulty setting.

If i can atleast get some code to get me started that would be great!!!
But it would definetely be more helpful if i can get some idea of how to code the other tasks.

Cheers
Peter.D