# How do I program a 2 player (multiplayer) game with Flash?

**URL:** <https://forum.kirupa.com/t/how-do-i-program-a-2-player-multiplayer-game-with-flash/323482>\
**Category:** programming\
**Created:** [July 3, 2011, 2:41pm UTC](https://forum.kirupa.com/t/how-do-i-program-a-2-player-multiplayer-game-with-flash/323482 "2011-07-03T14:41:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Things](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Things](https://forum.kirupa.com/u/Things)\
**Post date:** [July 3, 2011, 2:41pm UTC](https://forum.kirupa.com/t/how-do-i-program-a-2-player-multiplayer-game-with-flash/323482/1 "2011-07-03T14:41:24Z")

</div>

Hey guys! I’ve read some tutorials, and I now know how to create platform games, RPGs, scrolling shooters etc. That’s all cool, but I want to create a multiplayer game, so that two or more players can play simultaneously (like Contra III for SNES).

I know it is possible. I’ve seen a tutorial in YouTube, but the code was too small, so I couldn’t read it. I’ve downloaded the source FLA of this: [http://www.kirupa.com/developer/mx2004/platform\_game.htm](http://www.kirupa.com/developer/mx2004/platform_game.htm)

And I’ve created another character (player 2), converted it to a movie clip, copied the code of player 1 into the actions of player two, and changed some of the values, so that “left” is “a” etc.

It didn’t work though, whenever I pressed “a” or left key, both characters would walk left.

It did work with jumping though, when I pressed “up” char one was jumping up and when I pressed “W”, char2 was jumping up.
