# Rotation Problems

**URL:** <https://forum.kirupa.com/t/rotation-problems/297879>\
**Category:** flash\
**Created:** [October 9, 2009, 3:25pm UTC](https://forum.kirupa.com/t/rotation-problems/297879 "2009-10-09T15:25:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtk13](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@dtk13](https://forum.kirupa.com/u/dtk13)\
**Post date:** [October 9, 2009, 3:25pm UTC](https://forum.kirupa.com/t/rotation-problems/297879/1 "2009-10-09T15:25:53Z")

</div>

Every time I try and apply a rotationY (or any rotation) I get this error:

```auto

Access of possibly undefined property rotationY through a reference with static type flash.display:Sprite. sprite.rotationY=-10;

```

here is the code:

[AS]  
package{  
import flash.display.\*;

```
public class Rotation extends MovieClip{
    public function Rotation():void{
        var sprite:Sprite = new Sprite();
        sprite.graphics.beginFill(0xFFCC00);
        sprite.graphics.drawRect(100, 100, 100, 100);
        sprite.graphics.endFill();
        sprite.rotationY=-10;
        addChild(sprite);
    }
}

```

}  
[/AS]

Thanks.
