Use XMLSocket to monitor the production system in flash (2-1)
Source: Internet
Author: User
2. skills 1. XML objects can load, parse, send, structure, and protect the XML document tree by applying the methods and attributes of the object instance. The most exciting thing is that in Flash's latest FlashMX, the XML object has become a local 2. skills first
1. XML object
By applying the methods and attributes of the object instance, you can load, parse, send, structure, and protect the XML document tree.
It is exciting that in the latest Flash MX version, XML objects have become a local object, that is, the built-in direct support for Flash Player 6 (Flash Player 5 only has more than 300 KB, while Flash Player 6 has 800 KB, and many built-in objects are quite large .), Therefore, the dynamic performance is greatly improved.
Before applying an XML object, you must use its structure function to create an object instance, and then apply its method and attributes to control the XML document tree. XML objects have two types of structure functions:
1) new XML (src)
The src parameter must be an XML text with an accurate pattern. the following statement first generates an XML object instance by passing in the XML text. two non-static texts (TextField objects) the content of the instance nameTextField and passwordTextField is distinguished as "Morgan" and "loveme", for example:
MyXML = new XML (" ");
NameTextField. text = myLogin. attributes. username;
PasswordTextField. text = myLogin. attributes. password;
2) new XML ()
An empty XML object instance is created, and corresponding methods such as load (), createElement (), createTextNode (), cloneNode (), and appendChild () are called () for detailed usage, refer to the Flash online help. the focus of this article is to apply the Flash socket connection, therefore, the HTTP-based send (), load (), and sendAndLoad () methods of XML objects are not prefixed. for how to structure the XML document block tree, see the following.
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