Flash
  Home arrow Flash arrow Page 5 - XML Sockets in Flash
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

XML Sockets in Flash
By: Richard Lyman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 26
    2002-04-02

    Table of Contents:
  • XML Sockets in Flash
  • Methods and Properties
  • Common Utilizations
  • Possibilities
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XML Sockets in Flash - Summary


    (Page 5 of 5 )

    All in all the XMLSocket object allows for an increased vocabulary between clients and/or server. This allows the developer to bring about more dynamic ‘real-time-capable’ data. The XMLSocket object also facilitates the transferal of information from storage to use. The XMLSocket object is only one of many methods available for this transferal, yet it’s advantages give the developer an increased range of motion in delivering that data to the client.

    There are precautions that need to be taken, as Flash does not currently support encoding of a robust nature. There are Flash developers who have scripted objects that deal with MD5 encryption, yet they tend to be bulky, and unwieldy. Care must also be taken when addressing issues of usability in Animated representation of data. The Flash Player version 5 needs code snippets to deal with a loss of frame rate when parsing larger XML documents, yet the Flash Player 6 Beta release does not.

    Attention should also be focused on the structuring of the XML document or string that is to be sent to Flash. Flash tends to favor less parent/child node structure, and more an attribute type of structure. For instance, the string:

    <top> <firstChild> <insideDescription1> Text1 </insideDescription1> </firstChild> <secondChild> <insideDescription2> Text2 </insideDescription2> </secondChild> </top>
    Would be better defined like this:

    <top> <firstChild type=’insideDescription1’ text=’TEXT1’/> <secondChild type=’insideDescription2’ text=’TEXT2’/> </top>
    if at all possible. There are circumstances that do not allow for this style of structure, but it should be used if it can.

    It should also be remembered that Flash does not have to accept only XML formatted data. By using the ‘onData()’ event handler we can process other forms of information. Why send a string like this:

    <top> <xPosition> 234 </xPosition> <yPosition> 34 </yPosition> <zPosition> 4 </zPosition> </top>
    When the string: “234|34|4” would more than suffice? The XMLSocket does not use ‘headers’ like standard HTML does, nor does it require bulky tag explanations if you don’t want it to. The joy in the XMLSocket implementation is that you can define your data anyway you wish and display it from your server to anywhere you can squeeze Flash!
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Is there a closing bracket that's misplacing in the 2nd implementation...
     

    FLASH ARTICLES

    - 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
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek