hi all

can anyone explain to me how i can introduce directional rotation the code below please?

PHP Code:
import flash.events.Event;

var 
acceleration:uint 10;
for(var 
i:int=0;i<numChildren;i++)
{
    
getChildAt(i).addEventListener(Event.ENTER_FRAME,loop);
    
MovieClip(getChildAt(i)).ranx Math.floor(Math.random()*stage.stageWidth);
    
MovieClip(getChildAt(i)).rany Math.floor(Math.random()*stage.stageHeight);

}

function 
loop(e:Event):void
{
     
e.target.+= ((e.target.ranx-e.target.x)/acceleration);
     
e.target.+= ((e.target.rany-e.target.y)/acceleration);
     if (
Math.floor(e.target.x) == e.target.ranx || Math.floor(e.target.y) == e.target.rany
     {
          
e.target.ranx Math.floor((Math.random()*stage.stageWidth));
          
e.target.rany Math.floor((Math.random()*stage.stageHeight));
     }
        
     if((
Math.abs(e.target.e.target.ranx)) < 1)
         
e.target.e.target.ranx;

at present this script sits within an mc - and makes it move randomly - how can i make the target clip/s point in the direction they are going?

i guess it would be in the "e.target" but i have no idea how to write it! and can't find the answer anywhere. any know where to start?