Home arrow Flash arrow Page 4 - XML Sockets in Flash
FLASH

XML Sockets in Flash


The purpose of this tutorial is to familiarize readers with the XMLSocket object in Flash, it's methods and properties. Teach the reader the more common methods of using the XMLSocket object, and then open the reader up to the possibilities allowed by the XMLSocket Object.

Author Info:
By: Richard Lyman
Rating: 4 stars4 stars4 stars4 stars4 stars / 30
April 02, 2002
TABLE OF CONTENTS:
  1. · XML Sockets in Flash
  2. · Methods and Properties
  3. · Common Utilizations
  4. · Possibilities
  5. · Summary

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
XML Sockets in Flash - Possibilities
(Page 4 of 5 )

As I mentioned - where you go from here is up to you. XML has strength where other markup languages do not, in that it is a framework, not a finished product. You can define your data any way you'd like. As long as you code so that the clients and/or the server understand the language they speak, you can do anything, anyway you'd like.

For example, how about your own graphical presentation of the newest article from your favorite web site?? Simple. Write your server app to accept a string like, "<infoRequest client='mySessionID'/>", grab the HTML page, filter out the content needed, and send back a reply to that client like, "<infoReply client='mySessionID'>The info you requested</infoReply>". Then it would be a simple matter in Flash to parse the XML reply from the server into the graphical representation you designed. Tied to personalization, a user can visit your web site, and see 'live' updates of the content they want - presented the way you/they wanted it.

Speaking of requesting information and replying - how about minimizing the load your server experiences through HTTP requests for database information?? Many sites currently submit a new request for each segment of data that the client needs. Using Flash to maintain a persistent socket connection to your server, while the socket app running on your server also maintains a persistent connection to the database might allow you to funnel data to the client in 'real-time' with out the overhead of either page reloads, or new requests.

There are other advantages as well. Since this entire system is simply a socket connection on each end, with XML being the preferred language, you could send strings of numbers that each end could interpret as actions/reactions to situations. Many websites have designed full server engines, and client environments that allow for 'real-time' multi-user content. Until a few months ago the main focus of a multi-user app has been for chat, but many others are looking to more diverse methods of enabling client interaction. While Quake has yet to make an appearance in Flash, multi-user 3D, as well as 2D and ISO environments exist.

A benefit to the separation of ActionScript from other languages is that ActionScript can focus on the presentation of the data, and not necessarily the manipulation of it. If you've ever had some killer app that grabbed the data by the tail and swung it around, you might also want a simple means of delivering that data to others. Flash's graphical abilities combined with other languages data power though the XMLSocket object could be the answer.
blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials