Help with my Gravity Code

hello all.

I’ve come up with this little piece of simple gravity code

    
    
    var    yfall    =    0
    var    grav    =    0.3
    
    function onEnterFrame(){
        
        yfall = yfall + grav
        
        if(_y + yfall > 755){
            yfall =- yfall*0.65
            }
        _y = _y + yfall
        
        }
        
}


This is in a seperate .as file to my movie and as items from my movie are randomley generated from an array these physics properties are then applied dynamically to the randomley generated clips.

What i would really like to do is have the clips explode out in a set arc shooting upwards befor being pulled down by gravity.

Two questions:

  1. How would i get the clips to go up befor the physics code kicks in?
  2. How do i get the clips to fall at a random angle?

I thought the random angle code might look somthing like this:



        random:Number = 270*(Math.PI/180);


But that dosent seem to work.

Any ideas?

Thanks.