Rotation Problems

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


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.