The XMLShortcuts component enables shortcut access to All XML nodes.
Biggest advantage of using XML shortcuts is it can be easily added to existing projects with out any modification. Simply drag and drop the component from components window to the stage and then delete it from stage (let it stay in the library).
Available Shortcuts:
|
---|
Note: Replace childNode, index, and attribute with their respective values. See the example below
my_xml:
<english>
<a word="apple">a for apple</a>
<a word="Arul">a for Arul</a>
<b word="ball">b for ball</b>
<b word="bee">b for bee</b>
<c word="cat">c for cat</c>
<c word="cow">c for cow</c>
</english>
|
Using the XML above
Untitled Document
|
---|
Caution: Avoid data type declaration while initializing XML and XMLNode
for example the following code will throw a compiler error “There is no property with the name ‘x'”
Where as the following code works fine
Hope it is of some use to everyone using flash and xml in their day to day life. Feel free to express your views in the comment, I will be glad to hear from you 🙂
Download: XMLShortcuts.mxp