I was having trouble displaying Actionscript and MXML code on these webpages correctly (I am using the free version of WordPress).  ‘blockquote’ and ‘pre’ just weren’t cutting it, and I make too many corrections to do it manually.  After digging around a bit, I found a great program called “Highlight” by André Simon:


I am using version 3.0 Beta.  I had to add the line:

ActionScript (*.as)

to the file:

{Highlight install directory}/gui_files/ext/fileopenfilter.conf

in order to start to get Actionscript highlighting correctly (I’ve found that Javascript works just as well for most scenarios).

I generally add ‘blockquote’ around my code, so it was nice to be able to have no header/footer, and be able to copy the code to the clipboard.  He is working on adding the ability to have code prepended/postpended within Highlight, so I won’t have to manually add ‘blockquote’.

You can choose line numbering (as an HTML anchor, list item, or just text, zero-padded to a specified number of digits), and pre-set indentations, can convert from files and from clipboard, choose the output font, wrap the lines, etc., etc.  One of my favorite features is changing the color theme on the fly.  Right now, I am using ‘edit-kdev’ theme, but it does not pick up the [Bindable] AS3 tag, so I will probably have to switch to a different theme.

There are a huge number of code syntaxes to choose from, too, so it’s not just for Actionscipt (e.g., Java, C++, and so on.  Actually, you can re-format (move locations of brackets, line spacing, etc.) Java and some other syntaxes within Highlight as well – a really cool feature, but not available for Actionscript).  Further, he has just added MXML support, which is really cool because it also highlights the embedded Actionscript and CSS, too.  This should appear in version 3.0 Beta soon.

– 30 –