Max Blog

My Blog

AS3 and the kids

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.

posted by admin in AS3 Creative point of view and have No Comments

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment
Before you submit form:
Human test by Not Captcha