The server is not the problem. You can have a sufficient Java server in 500 lines of code that manages connections and passes along data sent from one client to others and leave the actual logic in Flash. But it's not as easy as adding some extra code to your game and it'll become synchronized across computers.
'if (Key.isDown (Key.RIGHT)) player._x += speed' ?
'if (bullet [i].hitTest (enemy [j])) enemy [j].removeMovieClip ()' ?
Nope. You can't just add a line here sending a message to your peers to do the same action as you go. The message is going to arrive with latency, or it might not arrive at all. It just won't work.
If you have a nice game object framework it might be easier to add a gateway to which the game objects send what they want to happen rather than executing the effect, and then leave it to the gateway to handle the synchronization. The gateway can send out the socket messages and verify that absolute states are in sync, and decide when to hang a game in case of network issues.
It's much easier if it's a turn-based game, of course. One client waits for the other to decide and send a message of his move, then the other way.