1 Reply Latest reply on Nov 29, 2006 6:06 PM by Newsgroup_User

    ... Pac Man

    FlashIsTheCoolest123
      How would I go about making the pacman in my game change direction when he moves. Is there any code to make him rotate left or right 90 degrees when left or right is pressed or "face downwards" when down is pressed? thanks.
        • 1. Re: ... Pac Man
          Level 7
          FlashIsTheCoolest123,

          > How would I go about making the pacman in my game
          > change direction when he moves.

          How would I make the Pac-Man in *my* version do the same? (Hint: how
          could anyone possibly know, since I haven't yet provided any information on
          how I implemented the game?) Programming is a complex subject, and each
          effort is a unique challenge. What steps have you taken so far? Are you
          coding in AS1, AS2, or AS3?

          > Is there any code to make him rotate left or right 90
          > degrees when left or right is pressed or "face downwards"
          > when down is pressed? thanks.

          The MovieClip class features a number of useful properties, methods, and
          events, that may interest you in regard to your game (assuming you're coding
          in AS2). You might use the MovieClip._rotate property, for example, to
          rotate your Pac-Man clip. You might use the MovieClip._width or
          MovieClip._xscale properties to horizontally flip your clip.

          Are you programming this game from scratch, or are you meshing together
          snippets from existing code?


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."