# Flash CS3 (AS2) Quick Question -Rotation

**URL:** <https://forum.kirupa.com/t/flash-cs3-as2-quick-question-rotation/271566>\
**Category:** flash\
**Created:** [September 24, 2008, 5:57pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-quick-question-rotation/271566 "2008-09-24T17:57:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salty\_Pepperpot](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Salty\_Pepperpot](https://forum.kirupa.com/u/Salty_Pepperpot)\
**Post date:** [September 24, 2008, 5:57pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-quick-question-rotation/271566/1 "2008-09-24T17:57:19Z")

</div>

Heres my problem

I have a movieclip that will rotate by 10 right if the right button is pressed, or 10 left if the left button is pressed.

Now, some genius tell me why the right button code works perfectly, but when i press left it doesnt rotate. It moves left, but no rotation to be found 😛

halp!

heres the code

onClipEvent (enterFrame) {

```
if (Key.isDown(Key.LEFT)) {
    xspeed -= power;
    this._rotation = -10;
    
}
        else {
        this._rotation = 0;
        }
            
if (Key.isDown(Key.RIGHT)) {
    xspeed += power;
    this._rotation = 10; 
}
        else {
        this._rotation = 0;
        }

```

cheers!
