[CS5/FlashDevelop]Help with multiuser architecture?

HI! I am trying to make a facebook game, a realtime 2D SideScrolling Sandbox MMO.

Currently, I want to use flash for the client(duh) but use a java server to keep all clients in sync, and php for MySQL database work. So far for the java server I have xsocket, but if you have one to recommend, shoot.

How exactly would this work? Can anyone give me a tutorial? I am a php developer, so I can write the php scripts just fine, I just don’t know how to make flash use the script and gather data from it.

As for the Java server, I think it has something to do with one client sending data to the server, then the server pushing the data to all client except the one that sent.

So, as for a tutorial, can someone make a simple flash client that gets data from Facebook, uses php to get a userid from the DB(based on info gathered from facebook) and uses a certain sprite based on data also from DB, and then uses a java server to keep that userid’s character position in-sync with all clients, and maybe throw in a simple chat too? LOL, I think I just made that sound like a lot of work. But heh, thats about all I need in order to learn to make everything else. Except the terraforming, I am still deciding on how that will be done. (I think I will have to do it with blocks sigh that are stored in a DB, and then as the player removes them, the php removes them from DB so they dont show up at restart, and the java server tells the other clients to vanish them)

Also, if any bored Flash or Java Guru decides to offer his/her help coding this project, I will set up an SVN repository, and make sure you know that your help is appreciated. It doesnt have to be a lot of work, just write a few things here and there, and just answer questions I have. Nothing full time, nothing demanding.

P.S. Forgot to throw in there, can you make a camera for the sidescrolling part in the client?

EDIT: Ok, I tried following some tutorials and I can’t. CS5 doesnt do things the way the tut says. What flash ide or whatever do these tutorial generally use? It better support ActionScript 3.