SyntAction 1.0
July 6th, 2009 Posted in AS3Yesterday, I blogged about reinventing-the-wheel and when it can be a good thing. It wasnt just idle chatter, I’ve been busy coding something thats been done plenty of times. The reason was to brush up on my regex knowlegde. The end product of the wheel reinevinting is an ActionScript syntax colour highlighting widget.
I wanted to have something like that for my blog since I do occasionally post about specific code I come across / write. So I’ve pitched it towards being an embedable widget for any website simply for the purpose of demonstrating code. As such it works by pointing it at an AS file somewhere on the web and additionally the colours are configurable using a simple XML schema (see example here).
Its not (yet) perfect in every way, I didnt get as far as adding support for regex colour coding (ironic, when you consider improving my regex was one of the reasons for building it). The string literal matching owes a lot, and is almost identical to the regex used by google prettify but other than that its all my own work.
I’ve created a simple page for it at http://syntaction.barncar.com/. This page has example embed code for anyone wanting to use it – feel free to point at the .swf on my hosting, it’d be great if other people can find a use for it. If anyone is interested in having a look at the code , drop me a line – improvements welcome
Heres an example of it in action:

3 Responses to “SyntAction 1.0”
By julien on Jul 6, 2009
very nice work, thanks for sharing
By Doug on Jul 19, 2009
I leave you alone for a couple of weeks and this is what you get up to… tut tut!
Nice idea matey.