# \_rotation easing with AS

**URL:** <https://forum.kirupa.com/t/-rotation-easing-with-as/206240>\
**Category:** flash\
**Created:** [November 6, 2006, 2:58pm UTC](https://forum.kirupa.com/t/-rotation-easing-with-as/206240 "2006-11-06T14:58:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tino\_](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tino\_](https://forum.kirupa.com/u/tino_)\
**Post date:** [November 6, 2006, 2:58pm UTC](https://forum.kirupa.com/t/-rotation-easing-with-as/206240/1 "2006-11-06T14:58:47Z")

</div>

Hi, everyone!

onClipEvent (load) {  
targetx = 34;  
delay = 8;  
}  
onClipEvent (enterFrame) {  
distx = targetx-\_x;  
disty = targety-\_y;

```
  _x += distx/delay;
_y += disty/delay;
    }

```

This is the code used for manipulating the background image using buttons with defined x and y; I want to add the rotation as well, and it does rotate the image, since I’ve defined the individual rotations within buttons’ script, but I cannot get it to delay; it instantly jumps to the given rotation, and then already rotated delays to the given x and y. Any ideas? Thx!
