The Space For App Developers

Beyond Plain Old HTML Objects

Archive for the ‘as3term’ tag

as3term 2.0.0 released!

with 4 comments

I’m very pleased to announce the release of as3term 2.0.0. For those who don’t know it, as3term is a terminal-like application that lets you compile and execute simple snippets of AS3 code. It was built with Flex/AIR 2.0 and it uses the NativeProcess API to launch the fcsh compiler, which is part of the Flex SDK. You can check out one of my previous post with the screen cast showing it in action.

This release includes several important changes and improvements:

  • AS3 syntax coloring based on AS3TextArea (another open source project that I released recently)
  • Using the fcsh.jar compiler from the Flex SDK instead of mxmlc, which provides an enormous improvement in compilation time.
  • Added window resize gripper
  • Window centering
  • Updated Swiz to version 1.0 RC2

You can download as3term from here. If you have it already installed you just need to run it and it should update itself using the NativeApplicationUpdater.

Written by Piotr Walczyszyn

September 16th, 2010 at 6:42 pm

Posted in News,Releases

Tagged with , ,

AS3TextArea – simple AS3 syntax coloring Flex/Spark component

with 11 comments

Last week I released the as3term project, which is a simple AS3 Terminal application. This week as part of my work on as3term 2.0 I’m publishing this simple AS3 syntax coloring Flex/Spark component. Actually I was inspired by my colleague Anirudh Sasikumar and his powerful as3syntaxhighlight library. My initial thought was to use the library, but for as3term I needed something really simple, so I thought that I would write it myself using a few RegExp statements ;)

This component can be used to colorize source code of other programing languages. I defined multiple types of language keywords that should be recognized and styled. For each type you can specify your own styling as well.

  • .default styles all keywords that don’t have style specified
  • .text styles non-keyword text
  • .var exceptional var styling
  • .function exceptional function styling
  • .strings exceptional string styling
  • .asDocComment multiline comments /** comment **/
  • .comment single and multiline comments: /* comment */ and // comment
  • .accessModifiers styles: public, private, protected, internal
  • .classMethodVariableModifiers styles: class, const, extends, final, function, get, dynamic, implements, interface, native, new, set, static
  • .flowControl styles: break, case, continue, default, do, else, for, for\ each, if, is, label, typeof, return, switch, while, in
  • .errorHandling styles: catch, finally, throw, try
  • .packageControl styles: import, package
  • .variableKeywords styles: super, this, var
  • .returnTypeKeyword styles: void
  • .namespaces styles: default xml namespace, namespace, use namespace
  • .literals styles: null, true, false
  • .primitives styles: Boolean, int, Number, String, uint

Below is a demo application that actually colors the syntax of its own logic. You can also checkout the source code over here.

UPDATE 09.09.2010 – I submitted the source code to the github.

You can paste or type in your own AS3 code into it and it will do coloring as you type.

This movie requires Flash Player 10

And this is how as3term will look very soon:

Written by Piotr Walczyszyn

September 7th, 2010 at 12:53 pm

Posted in Examples,Releases

Tagged with , ,