# Buttons click and hold action

**URL:** <https://forum.kirupa.com/t/buttons-click-and-hold-action/160505>\
**Category:** Uncategorized\
**Created:** [August 26, 2005, 12:48pm UTC](https://forum.kirupa.com/t/buttons-click-and-hold-action/160505 "2005-08-26T12:48:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davedark](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davedark](https://forum.kirupa.com/u/davedark)\
**Post date:** [August 26, 2005, 12:48pm UTC](https://forum.kirupa.com/t/buttons-click-and-hold-action/160505/1 "2005-08-26T12:48:46Z")

</div>

Hello,

Probably really easy but can’t think how to do it! I need an action to be continually repeated while a button is being pressed.  
At the moment it just rotates the selected movieclip by 10. The button has to be pressed again and again to change the rotation.

```auto
angleRight.onPress = function () {
_root.selected._rotation = _root.selected._rotation +=10;
};

```

I need a method where the angle can be changed as smoothly as possible.

Any ideas?

Thanks
