Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AS3 Flash Chat(-IRC) Module

Participant ,
Oct 23, 2008 Oct 23, 2008
Over the past I had create in AS2 a chat application, where after a registration the users could enter the application and talk together like an IRC application.

Still it was very novice, as I used a mySQL database to keep the messages, and I was updated the last data every 5 seconds, or when the user was sent a message. The chat module can have max. 50 people and no rooms (no need for rooms). And I have no idea how to fix such a program without using a database.

Do you have in mind any idea, or tutorial or any kind of info that could help in the creation of a more advanced of such a (useful) module?

I call it as "module" in terms of a seperate .swf file that can be loaded and used independently in different web-sites, where people ask for chat capabilities....
TOPICS
ActionScript
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 23, 2008 Oct 23, 2008
One way or another you need a server.

The way you did it before, polling a MySQL database, is a perfectly reasonable method of doing things most of the time. The biggest advantage is it requires no additional technology or learning curve.

You have two primary "better" alternatives, both with cost tradeoff:

1) Use an XMLSocket server. This is a server that you install or create on your existing host which allows for Flash's XMLSocket connections. XMLSocket connections will let you send XML data to the server, and let the server push XML data at any time to all connected Flash clients (without forcing the Flash client to request it first, like you were doing with polling.) There are many popular XMLSocket servers out there, and a few tutorials on how to make your own (usually in Java):
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=8El&q=Flas...

2) Use Flash Media Server. This let's you connect via Flash's rtmp connection method. You can write server applications that push data like an XMLSocket server, but you can also send native ActionScript data across the connection, not just XML. You can also send video and audio. The server application language is also written in ActionScript, so it's very easy to learn. It's by far the smoothest solution in my opinion, but it is not cheap.
http://www.adobe.com/products/flashmediaserver/

You can get 3rd party hosting for FMS, I use Influxis:
http://www.influxis.com/

There are also some open source Flash media server clones, but they use different serverside language and I don't have very positive experiences with them (but they are free):
http://osflash.org/red5
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 23, 2008 Oct 23, 2008
Or you can use remoting (WebOrb).
And another excellent media server: Wowza (wowzamedia.com I believe)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 23, 2008 Oct 23, 2008
Red5 btw is a perfect solution for a chat. And a great open source product imho but it's just not documented well (or not documented one could say...).
Other server side language? As far as I know they all use Java.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 24, 2008 Oct 24, 2008
LATEST
By different language I just mean that FMS' server language is Server Side ActionSctipt (SSAS), so because it's the same syntax and core library as AS1/2 there's really no learning curve to an existing ActionScriptor.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines