# Converting from as2 to as3 problem

**URL:** <https://forum.kirupa.com/t/converting-from-as2-to-as3-problem/279195>\
**Category:** Uncategorized\
**Created:** [January 11, 2009, 11:50am UTC](https://forum.kirupa.com/t/converting-from-as2-to-as3-problem/279195 "2009-01-11T11:50:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shebimangalath](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@shebimangalath](https://forum.kirupa.com/u/shebimangalath)\
**Post date:** [January 11, 2009, 11:50am UTC](https://forum.kirupa.com/t/converting-from-as2-to-as3-problem/279195/1 "2009-01-11T11:50:13Z")

</div>

```auto
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…**
