How to make a Pac-man Game in Flash CS4 Part 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,887
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 28, 2010

How to make a pac-man game in adobe flash cs4.

Codes:

Character:

onClipEvent (enterFrame) {
speed = 7;
if (Key.isDown(Key.LEFT)) {
this._x -= speed;
_root.char.gotoAndStop(2);
}
if (Key.isDown(Key.RIGHT)) {
this._x += speed;
_root.char.gotoAndStop(1);
}
if (Key.isDown(Key.UP)) {
this._y -= speed;
_root.char.gotoAndStop(3);
}
if (Key.isDown(Key.DOWN)) {
this._y += speed;
_root.char.gotoAndStop(4);
}
}

Food:
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.dot.gotoAndPlay(2);
}
}

Frames:

stop();

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (keaka070)

  • can u plz update the codes? cause the ones in your vid re right but in the description there wrong!, and if u update them i might think about subscribing :D

  • @VvConorvV all of the codes are correct

  • when my pac man tries to eat food nothin happens....is it maybe becuase my dot is massive?? well not massive but big...

  • @VvConorvV well id you make sure to set the food's instance name to "dot" and did you make a second blank keyframe in the food?

see all

All Comments (27)

Sign In or Sign Up now to post a comment!
  • Hallo, I'm working with actionscript 3.0 and i have no idea how to create the eating dots effect.... can you help me with that??

    grzz

  • my wont work he goes ot the left without even moving him

  • when i test the animation. the pacman goes left of the page on its own. it does move when i press the keys

  • To all the ignorant people out thar, i'll explain why your food won't get eaten up.

    Thats because when you created the dot , you didn't highlight it you merely CLICKED it and > create symbol. You HAVE to highlight the whole thing before you create symbol. Else its the outline of the food thats getting eaten and you see nothin ;)

  • Hello hun. Why is it that my walls ain't solid? My pacman was able to penetrate the walls if i were to hold the direction buttons without letting go. Please help :)

  • How do I test the animation

  • Is the language used for writting the actions C++? It has many similarities in syntax and I was wondering if it was c++ or another language. Thanks.

  • @VvConorvV me 2 but my dot is small!

  • when i move pacman, he doesnt turn, but i have the "right" movieclip wit the pacman ffacing each direction everyway in 4 keyframes ?? what have i done?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more