How do I attach actionscript code with proper formatting (colours) to my post?

Hi, I see there’s a

Cool little box thing you can do

but I really want to attach my code in all it’s colourful glory. Is there an easy way to do this?

Cheers