Flash through the Xmlsocket Monitoring production system (2-1)

Source: Internet
Author: User
Tags socket
xml| Monitoring

Keywords: flash, XML, Xmlsocket, TextField, Web mode, timely monitoring

Second, Technical introduction

1. XML objects

By using the methods and properties of the object instance, you can load, parse, send, construct, and maintain the XML document tree.
The exciting thing is that in the latest flash version of Flash MX, the XML object has become a local object, the direct support built into Flashplayer 6 (Flash Player 5 is only 300 KB, and Flash Player 6 has a KB, The built-in many objects are quite a big reason. ), therefore, dynamic performance has been greatly improved.

Before you can use an XML object, you must generate an object instance through its constructor, and then manipulate the XML document tree by using its methods and properties. There are two types of constructors for XML objects:

1 new XML (SRC)

Where the parameter src must be well-formed XML text, the following statement first generates an XML object instance by passing in the XML literal, and the two non-static text (TextField object) The contents of the instance Nametextfield and Passwordtextfield are set to "Morgan" and "Loveme", respectively, as follows:

myXML = new XML ("");
Nametextfield.text = MyLogin.attributes.username;
Passwordtextfield.text = MyLogin.attributes.password;

2 new XML ()

Generates an empty XML object instance and then invokes its corresponding method, such as load (), createelement (), createTextNode (), CloneNode (), AppendChild (), and so on, to construct or load an XML document tree. Specific usage can refer to the Flash online help, because the focus of this article is the use of flash socket (socket) connection, so on the XML object based on the HTTP protocol send (), load (), Sendandload () and other methods are not introduced, See below for how to construct an XML document tree.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.