# Convert to AS3

**URL:** <https://forum.kirupa.com/t/convert-to-as3/307334>\
**Category:** flash\
**Created:** [April 1, 2010, 7:58pm UTC](https://forum.kirupa.com/t/convert-to-as3/307334 "2010-04-01T19:58:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Vercotti](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@Luigi\_Vercotti](https://forum.kirupa.com/u/Luigi_Vercotti)\
**Post date:** [April 1, 2010, 7:58pm UTC](https://forum.kirupa.com/t/convert-to-as3/307334/1 "2010-04-01T19:58:19Z")

</div>

Can someone please convert it to AS3?

```auto
mMonty.tX = 0; 
mMonty.tY = 18.9;
mMonty.aX = 0;
mMonty.aY = 0;
mMonty.vX = 0;
mMonty.vY = 0;
mMonty.k = 0.3;
mMonty.damp = 0.8;

mMonty.onEnterFrame = function() {
if(!drag){
   this.aX=(this.tX - this._x) *this.k;
   this.aY=(this.tY - this._y) *this.k;
   this.vX+=this.aX;
   this.vY+=this.aY;
   this.vX*=this.damp;
   this.vY*=this.damp;
   this._x+=this.vX; 
   this._y+=this.vY;
}
}
mMonty.onRollOver = function(){
startDrag(this);
drag=true;

};
mMonty.onRollOut = function(){
stopDrag();
drag=false;
};

```
