PDA

View Full Version : JS class for syntax coloring in AS3



wvxvw
August 3rd, 2008, 07:08 PM
Hi.
I'm making a JS class, that may be useful for anyone who makes blog/forum where he has to display AS3 code.
Here're some features that already exist/will be implemented soon:
Code coloring.
Links to manual for core AS3 classes.
Folding.
Search inside the code.

It's not yet finished, but, I'm working on it and improving... when I have time. If you want, you may use it, but, surely, if you have anything to change/fix/improve in it, I'd greatly apprecate every your input.

Here's a screenshot of the current version:

47397

And here're the sources:

47398

I may probably port this to PHP later, so that one may store his source AS files on his server and use a PHP script for displaying AS files in browser. Will see...

devonair
August 4th, 2008, 07:27 AM
Looks terrific! If you made this into a WordPress plugin, the world would love you.. Well the actionscripting/blogging world, anyway..

simplistik
August 4th, 2008, 10:37 AM
Not hatin or anything like that, but doesn't GeSHi already do this? Or does it not do it well? there is a WP plugin for it too

wvxvw
August 4th, 2008, 11:39 AM
Ooops, I have to confess I was unaware of it... I checked it out, and, GeSHi has no syntax coloring for AS3, but someone else has allready written AS3 language file.
Actually it does coloring only, and I wanted to make it more of the utitlity that may let you view your files from SVN on remote server and be able to skim through them faster/with less effort + navigate from one class-file to another if you come accros the reference to it in the file you're viewing. Like, if you had a class A importing class B, than viewing class A you'd have a link to class B file in it etc.