# Problems controlling a frame animation

**URL:** <https://forum.kirupa.com/t/problems-controlling-a-frame-animation/49889>\
**Category:** flash\
**Created:** [April 27, 2004, 5:02pm UTC](https://forum.kirupa.com/t/problems-controlling-a-frame-animation/49889 "2004-04-27T17:02:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brockus](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@brockus](https://forum.kirupa.com/u/brockus)\
**Post date:** [April 27, 2004, 5:02pm UTC](https://forum.kirupa.com/t/problems-controlling-a-frame-animation/49889/1 "2004-04-27T17:02:39Z")

</div>

I’m having some problems getting a frame animation to rotate completely clockwise and counterclock wise in Flash. The frame animation has been exported from Swift 3D. I have a left and right arrow underneath the animation, that depending when the user presses them, will spin the donut.

Here is the code…

counterClockBut.onPress = function() {  
counterClockWise = true;  
};  
counterClockBut.onRelease = function() {  
counterClockWise = false;  
};  
clockWiseBut.onPress = function() {  
clockWise = true;  
};  
clockWiseBut.onRelease = function() {  
clockWise = false;  
};  
this.onEnterFrame = function() {  
if (clockWise == true) {  
rockFrames.nextFrame();  
updateAfterEvent();  
} else if (counterClockWise == true) {  
rockFrames.prevFrame();  
updateAfterEvent();  
}  
};

But since I have a stop action on the first frame of the animation clip I’m unable to spin it either way from the beginning.

Can anyone point me in the right direction on finding a solution.

Thanks in advance…
