Converting from as2 to as3 problem

onClipEvent (load) {
 i = 0;
 m = Math;
}
onClipEvent (enterFrame) {
 c = createEmptyMovieClip (i, ++i % 300);
 c.lineStyle (8,0xFF0000);
 c.lineTo (1,0);
 c._alpha = 0;
 c.d = 1;
 c.r = m.random () * 6;
 c.onEnterFrame = function ()
 {
  with (this)
  {
   d *= 1.1;
   _alpha = d / 2;
   _x = m.cos (r) * d;
   _y = m.sin (r) * d;
  }
 };
}

this is a movieclip action for ‘animation’ in AS2…
How can i change this to AS3…
Could you please give me a solution for this…