# AS2 translation

**URL:** <https://forum.kirupa.com/t/as2-translation/294852>\
**Category:** flash\
**Created:** [August 20, 2009, 10:11pm UTC](https://forum.kirupa.com/t/as2-translation/294852 "2009-08-20T22:11:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tenrag](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@Tenrag](https://forum.kirupa.com/u/Tenrag)\
**Post date:** [August 20, 2009, 10:11pm UTC](https://forum.kirupa.com/t/as2-translation/294852/1 "2009-08-20T22:11:56Z")

</div>

Hi  
I have to use somethink like this;

```php
slider.dragger.onPress = function(){
    startDrag(slider.dragger,false,0,-15,372,-15)    
    _root.onEnterFrame = checkRotation;
}
slider.dragger.onRelease = slider.dragger.onReleaseOutside = function(){
    this.stopDrag()
    delete _root.onEnterFrame;
}
function checkRotation(){
    var pct = slider.dragger._x/372;
    var frame = Math.floor(25*pct);
    rotator.gotoAndStop(frame)
}

```

My problem is that this is in AS2 and i srarted playing with flash  
only about 2 weeks ago but with AS3 - i know how to do only few things with AS now.  
My question is:  
Could someone please translate it to AS3 if it’s possible.  
Or of it’s not possible show me some other exemple  
but in AS3.

I found this thread but as i sad i’m beginner an i really want to finish this before  
25th August

> **[ActionScript 3 Tip of the Day - Page 23](https://www.kirupa.com/forum/showthread.php?p=2110832)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Thanks to it i recived somethink like this:

```php
package { 
    slider.dragger.onPress = function(){
        startDrag(slider.dragger,false,0,-15,372,-15)    
        _root.onEnterFrame = checkRotation;
    }
    slider.dragger.onRelease = slider.dragger.onReleaseOutside = function(){
        this.stopDrag()
        delete _root.onEnterFrame;
    }
    function checkRotation(){
        public var pct = slider.dragger.x/372;
        public var frame = Math.floor(25*pct);
        rotator.gotoAndStop(frame)
    }
}

```

but it’s still not this.

Sorry for mistakes i i done some but my english isn’t perfect.
