AS3 is a proud holder of three inline languages:

  • XML
  • E4X
  • RegEx

I posted a references to usage of E4X in previous post. And here are two reference for usage of RegEx:

http://donttrustthisguy.com/2008/02/29/utilizing-regular-expressions-in-as3/

http://gskinner.com/RegExr/

But what I would really like to show you in this post is some syntax wonders of inline XML. Have a look at this code:

?View Code ACTIONSCRIPT
<root/*an AS3 comment*/>
    <!-- XML comment--> some text
</{(trace("let's close this tag"), "root")}>

It is compilable code. And yes you can use AS3 comments and XML comments inside of inline XML.
You can also embed inline AS3 inside of inline XML and it will be evaluated at runtime. So the close tag is correct in this example.

I hope the parenthesis syntax is familiar from the previous post.

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Before you submit form:
Human test by Not Captcha

© 2011 Max Blog Suffusion theme by Sayontan Sinha