Moving from ActionScript only two to ActionScript 3 allows us developers to change a lot of the habits we have been practicing for a long time.
Actionscript 3 actually consists of two XML related instructional classes, XML and XMLDocument. From a high level you can try it like this: XML is XML that is certainly parsed using E4X (a new comer to AS3 XML Text).
E4X is essentially a complete new language which is section of the AS3 grammar, just as regular expressions have their unique completely different language nevertheless exist within ActionScript 3. 0. And also being so new, there really isn’t a great deal of documentation out right now there. This is further complicated by the point that since E4X seems simple enough in the beginning to explain in a number of lines, a lot regarding documentation stops short.
Adding AS3 and XML
The question that begs being answered is why make use of AS3 XML Text. Flash 5 was extended permitting XML to be used for external data source. This provides you with you as a designer a terrific edge. XML takes care on the content and Flash is able to the presentation. With this combination you are able to create a template SWF file that’s populated by an outside XML document. Why is actually this good? The end result is that you just need to update theXML document to improve the content of this movie. No need to help open the Flash flick.
Flash MX uses in the same objects and methods to manage XML files. So what exactly is the difference between 5 and also MX? You will realize that the current Flash 6 Participant (version 6, 0, 65, 0) is more stable which enables it to handle more XML docs simultaneously. Flash 5 had an issue in that any a single movie could only cope with approximately 3 XML documents. If you relied heavily on XML to be a data format then you are in big problems. The most up-to-date Flash Player handles more XML files which is more efficient in parsing the ActionScript employed to present the XML inside your document.
The XMLDocument class symbolizes the legacy XML object that’s present in ActionScript a couple of. 0. It was renamed within ActionScript 3. 0 to XMLDocument to stop name conflicts with the brand new AS3 XML Text. With ActionScript 3. 0, experts recommend that you use the brand new XML class and associated classes, which support E4X (ECMAScript pertaining to XML).
The XMLDocument school, as well as XMLNode as well as XMLNodeType, are present with regard to backward compatibility. The functionality for loading XML documents is now able to be found in the particular URLLoader class..