# Rotate a Duplicated Movieclip

**URL:** <https://forum.kirupa.com/t/rotate-a-duplicated-movieclip/331056>\
**Category:** flash\
**Created:** [May 5, 2013, 2:31pm UTC](https://forum.kirupa.com/t/rotate-a-duplicated-movieclip/331056 "2013-05-05T14:31:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinfbradley](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kevinfbradley](https://forum.kirupa.com/u/kevinfbradley)\
**Post date:** [May 5, 2013, 2:31pm UTC](https://forum.kirupa.com/t/rotate-a-duplicated-movieclip/331056/1 "2013-05-05T14:31:03Z")

</div>

[LEFT][COLOR=#333333][FONT=adobe-clean]I am trying to finish a small project and am having trouble continuosly rotating a duplicated movieclip via a button. It will rotate by clicking the button; however, I have it set to 7.5 degrees and a complete rotation takes quite a while. We would like to just click and hold to rotate it. Once the button is released it would stop. Any help would be very much appreciated. I understand I need an onEnterFrame function but have no idea how to set that up (I am not a computer programmer and am trying to teach myself as I go). My code is below:  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]\*\*  
MovieClip (myMC):  
**[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]on (press) {[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
startDrag("", false);  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]}  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]on (release) {[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
stopDrag();  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]}  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]on (release) {[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
setProperty("/rotate", \_name, “”);[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
setProperty("", \_name, “rotate”);  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]}  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]**  
Rotate Button:  
**[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]on (press) {[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
ChangeRotation = getProperty("/rotate", \_rotation);[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
setProperty("/rotate", \_rotation, Number(ChangeRotation) -7.5);  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]}  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]**  
Button used to Duplicate the movieclip:  
\*\*[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]on (release) {  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean] _root.myMC.duplicateMovieClip ("myMC_"+ “x”,this.getNextHighestDepth());[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
setProperty (“myMC\_”+“x”, _x, 585);[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]  
setProperty ("myMC_"+“x”, \_y, 400);[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean] x++;  
[/FONT][/COLOR][COLOR=#333333][FONT=adobe-clean]}[/FONT][/COLOR][/LEFT]
