So, now we need to attach the ball in the scene, and be able to apply some forces. Let's take a look to the code:
function init() { leftLimit = 0; rightLimit = Stage.width; bottomLimit = Stage.height; topLimit = 0; } function createBall() { this.attachMovie("circle","myCircle",_root.getNextHighestDepth(),{_x:(rightLimit-leftLimit)/2, _y:(bottomLimit-topLimit)/2}); } init(); createBall(); this.onEnterFrame = function() { //Wind angle = Math.atan2(_ymouse-myCircle._y, _xmouse-myCircle._x); distance = Math.sqrt(Math.pow(_xmouse-myCircle._x, 2)+Math.pow(_ymouse-myCircle._y, 2))/10; myCircle.accelerate(-Math.cos(angle)/distance,-Math.sin(angle)/distance); //Keyboard detection if (Key.isDown(Key.RIGHT)) { myCircle.accelerate(0.4,0); } if (Key.isDown(Key.LEFT)) { myCircle.accelerate(-0.4,0); } if (Key.isDown(Key.UP)) { myCircle.accelerate(0,-0.4); } if (Key.isDown(Key.DOWN)) { myCircle.accelerate(0,0.4); } };

First function is the limits definition, right, left, top, and bottom. I've used the scene margins.
Next function is the ball creation, attaching the ball in the center of the screen with an instance name of  "myCircle".
We call both functions, and then the enterFrame.
In the enterframe, we will apply the wind effect. We have an angle between the mouse and the ball, also a distante. So, by using math, we call the accelerate function in the ball, sending the proyections of the vector defined in polar coordinates by an angle and a module.
After the wind, we just need to capture the keys, and send forces according the arrow direction.
Is simple like that. Now we want to define the particle behaviour.