In ActionScript 3, you can define XML variables using inline XML in your script. You don’t even need to enclose it in Strings like you did in previous versions of ActionScript. The ActionScript 3 compiler will automatically parse the XML in the code and recognize when it stops and when normal AS code starts.
var myXml:XML =
<body>
<!– comment –>
text1
<a>
<b>text2</b>
</a>
</body>;
<body>
<!– comment –>
text1
<b>text2</b>
</a>
</body>;
This entry was posted on Sunday, October 25th, 2009 at 6:15 am and is filed under ActionScript, Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
You might also like
| Mouse wheel handler in Javascript It returns a delta value, +1 or -1, according to scroll direction. Test : 1: up Meanwhile, check the original... | Make Lightbox without JavaScript! You may call it Lightbox, or Greybox, or Thickbox, but it's always the same effect. When you are on a page,... | Math.random() * Math.random() in AS3 var rand:Number = Math.random() * Math.random() * Math.random(); This is a trick I use when I need... | Edit the CSS styles of an element in Javascript I’ve actually started to learn the Internet beast JavaScript, and I think it’s about time I shared some knowledge... |








