A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: XML Socket Server Chatroom

Hybrid View

  1. #1
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590

    XML Socket Server Chatroom

    It's a first draft, but here's a chatroom, written in 3DFA 4.9.8.7, using an XML Socket Server at the back end.

    http://www.morgan-multinational.co.uk/xmlchatroom.html

    - To use this, simply open the site, change your user ID and click connect.
    - I recommend opening 2 windows to this site, as it's unlikely there'll be anyone else in at the time.
    - Type a message in the 'Message' box and hit 'Send'.

    The message will appear on the screens of yourself, and any other users in that room at the time.

    If I can find out why some of the XML stuff isn't working right, I'll make it work much better

    M.
    Please note that my domain has changed to http://www.morganmultinational.com

  2. #2
    Member
    Join Date
    Jul 2007
    Posts
    91
    This is great Do you use some php script?

  3. #3
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Cheers

    There's no PHP script in this one at all. I simply did the following:

    1. Installed Palabre XML Socket Server onto my webserver.
    2. Amended the Palabre.conf configuration file to change the default port from 2468 to 8080, so most clients should have their firewall configured to allow traffic to this port. (I may change this to something else, as I know of one person who seems to have this port blocked by his firewall).
    3. Amended my router set-up to pass traffic on port 8080 to the Palabre server.
    4. Amended the Palabre.conf configuration file to specify all the domains that my animations will ever be hosted on. This is so that Palabre will allow access only when an animation is hosted on one of my servers.
    5. Use the program listed on the Palabre site which allows any EXE to be run as a service, to make 'QuickStart.EXE' run as a service.
    6. Write my 3DFA client and export as Flash 8 to any of the domains listed in the palabre.conf file.
    7. Tear my hair out over and over again when discovering that the XML tools in 3DFA only seem to work when exporting as Flash 9, and that all the variables used throughout my movie only work properly when exported as Flash 8. Botch together a parsing script that takes the XML data from the socket server, treats it as a string, and does all manipulation of the XML data using a string instead of the more appropriate XML tools.

    If only I could get the XML tools to work. It would be a thousand times easier to do this, but no reply from support yet on this. Mind you, I'm still not sure I've got the correct support e-mail address.

    If anyone is interested in the source file, PM me, but I was hoping to get the XML tools working properly before making it public.

    M.
    Please note that my domain has changed to http://www.morganmultinational.com

  4. #4
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    That is really cool! I've been wanting to do that for almost a year now!

    I sent you a PM asking you for the source file, I really want to learn how to do this!

  5. #5
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Link to source code sent via PM
    Please note that my domain has changed to http://www.morganmultinational.com

  6. #6
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    could i have the source, too?
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  7. #7
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    PM Sent

    Once I get the XML working better, I'll post publicly, but it's too ugly to distribute widely at the moment
    Please note that my domain has changed to http://www.morganmultinational.com

  8. #8
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47
    Very nice.
    []'s
    leocavalcante.com

  9. #9
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Thanks ,

    Unfortunately, the more research I do, the more difficult it seems to be to get it to work properly. The XMLSocket command seems to only work in Flash 8, and the XML parsing tools only work in version 9.
    The wonders of technology

    I'll post the link to the source anyway, and if someone can work out how to get the XMLSocket command to work upon export to Flash 9, I can then get the XML parsing working properly.

    So here it is: http://www.morgan-multinational.co.u...t_4987_5.movie

    Any ideas would be welcomed !

    Cheers,

    Morgan.
    Please note that my domain has changed to http://www.morganmultinational.com

  10. #10
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    thx
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  11. #11
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    How do u install an XML socket server?

  12. #12
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    If you have access to a Windows server, download the install executable for Palabre XML Socket Server from Gavroche. (It's FREE)

    Also, on their website, they also have a link for a piece of software that allows you to run any executable as a service. (It's FREE)

    Install both bits of software, accepting all defaults.

    Run the 'Install Executable as Service' program and specify to run the Palabre software 'QuickStarter.exe' as a service, with automatic startup.

    Edit the Palabre.Conf file as mentioned above, and reboot your server.

    Job done.

    If you have a non-windows server, there are different install downloads available, but I know nowt about Linux, so wouldn't know how to install.

    Good luck, and feel free to post or PM with questions, once you've had a search for Palabre.

    Cheers,

    Morgan.
    Please note that my domain has changed to http://www.morganmultinational.com

  13. #13
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    how do you make a chatroom with xml sockets? i don't want to install anything on my server

  14. #14
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    you also can make one with mysql
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  15. #15
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Just stopped by after a long absence, so thought I'd comment on the above remarks.

    I did perform a very similar chatroom with MySQL in the past, but the responsiveness was very poor indeed. It relied on frequent polling to the server which slowed down the Flash applicaton, and seemed to be much more of a burden on the MySQL server and network. I found that the XML Socket method was vastly superior in performance.

    I'm shortly due to be between contracts again, so I might have another go at getting this updated to work with the latest version soon, and doing something more interesting with it.
    Please note that my domain has changed to http://www.morganmultinational.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center