That depends on whether or not you want A) movement in a random angle, or B) just want to bounce it around a random point on stage repeatedly...
Code:
// for A)
//...
var deg2rad:Number = Math.PI/180;
var speed:Number = 3; // set to speed you want
someClip.addEventListener(Event.ENTER_FRAME, moveIt);
someClip.rotation = Math.random() * 360;
var angle:Number = someClip.rotation * deg2rad;
function moveIt(e:Event) {
e.target.x -= speed*Math.cos(angle);
e.target.y -= speed*Math.sin(angle);
}
// for B)
// ...
someClip.addEventListener(Event.ENTER_FRAME, bounceIt);
function bounceIt(e:Event) {
e.target.x = Math.random()*stage.stageWidth;
e.target.y = Math.random()*stage.stageHeight;
}
Untested.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD WEI Score: 7.6