Flex syntax highlighter
Geshi filter is a php library that will color highlight code for you in about 157 different coding languages. It's the best library I've ever seen for syntax coloring.
I've written a simple service that will allow you to use geshi filter to syntax color in flash.
Step 1. Download geshi filter source, (http://www.filbar.org/project/geshifilter) and put it on your server.
Step 2. Place geshiservice.php alongside geshi.php. (Attached below)
Step 3. In your actionscript, use GeshiTextField.as, download here: GeshiTextField.as
Paste code in the top box, and then select the language to format the code.
Note: I've limited the example to 5000 characters, I don't want people overloading my server! The source I've included doesn't have this limit, you'll have to add your own limits to it if you'd like. Also, you will need to host the service yourself, if you try to use my example server, you will get a security error.