A few weeks ago, I opened the Chat example that comes with Flex Enterprise Services 2 to see how it works. Utilizing Flash Media Server (formerly known as Flash Communication Server) Remote Shared Objects requires low-level ActionScript. Since Flex is all about concise, high-level tags, I was curious how easy they had made it. Using the Chat example file as a basis, I tried to make a multiplayer airplane game where each person in the chat has an airplane avatar they can fly.
I’m sort of ambivalent towards their message implementation. Considering I haven’t read the documentation either, I’m sure I have missed a significant amount of information about the API and only used part of it. Glancing at the docs, this appears so. Additionally, I didn’t take advantage of the server at all; I just added 1 entry to the config and left. Flash Media Server has a lot you can do with the server to help you build multi-user applications, so I’m assuming the same for Flex Enterprise Services 2 as well.
I still feel from coding this that the API is just as low-level as writing pure ActionScript, only cleaner and AS3 compliant. This was only a 4 hour project, though, so I can’t really make any firm decisions on how I feel about it.
Bottom line, creating push based applications for most people will be f’ing cake. Using just 1 tag that allows you to bind various controls to data is pushed to the server is extremely powerful, and even those who barely use this feature will have immediate, and clearly visible benefits. For those of us creating games, I don’t know… more research & reading is needed.
Basically, install the server, open the flex-config.xml, copy the chat tags and name it “fly-jms”, and reboot the server. Either setup your Flex 2 project in the Flex server it installs, or write an ANT task to copy files there. Don’t forget, it installs in the Program Files > Adobe, not Macromedia, hehe!