# Character rotation problem

**URL:** <https://forum.kirupa.com/t/character-rotation-problem/32665>\
**Category:** Uncategorized\
**Created:** [October 9, 2003, 4:32pm UTC](https://forum.kirupa.com/t/character-rotation-problem/32665 "2003-10-09T16:32:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![future\_pilot](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@future\_pilot](https://forum.kirupa.com/u/future_pilot)\
**Post date:** [October 9, 2003, 4:32pm UTC](https://forum.kirupa.com/t/character-rotation-problem/32665/1 "2003-10-09T16:32:03Z")

</div>

small problem;  
I am revamping the classic Pacman game in Flash MX. I am using new artwork for the Pacman character, and my problem with the sourcecode is that it states when Pacman goes right, he simply flips 180 degrees. Since he is just a circle with a wedge for a mouth you can’t tell that he is upside down. My new art for Pacman  
is a profile of an alien and it looks dumb when you go right because he is upside down. I have attached my AS code below; is there a command that can give me a mirror image of my character when he goes right instead of just a cheesy rotation? _(see the first ‘else if’ command)_  
Any help is greatly + deeply appreciated

-future pilot

[AS]// setPacMove - works out and sets Pacman’s next move  
function setPacMove(d) {  
with (\_root) {  
if (d == 0) { nextX = pacX; nextY = pacY - 1; Pacman.\_rotation = 90; }  
else if (d == 1) { nextX = pacX + 1; nextY = pacY; Pacman.\_rotation = 180; }  
else if (d == 2) { nextX = pacX; nextY = pacY + 1; Pacman.\_rotation = -90; }  
else if (d == 3) { nextX = pacX - 1; nextY = pacY; Pacman.\_rotation = 0; }  
}  
}  
[/AS]
