In 2008, over one thousand people experienced the world’s first virtual web conference. Together, we created a new type of conference that is environmentally-friendly, affordable, and interactive.

In 2009, we are going to take it one step further.


metaas announced: ActionScript DOM in Java

David Holroyd announced metaas on the OSFlash mailing list today and it looks very exciting indeed.

metaas is an ActionScript parser/code generator written in Java that, "provides Java applications with a 'Document Object Model' for ActionScript 3 code." David states in his email that the primary purpose of metaas is as a code generator but what excites me most are its potential uses in pre-processing/post-processing of ActionScript code, documentation generation, etc. Having an ActionScript-aware DOM in Java could also be useful for ActionScript editors like the open source ASDT project.

From the documentation, here's a snippet that demonstrates how to parse an ActionScript file:

[java]FileInputStream in = new FileInputStream("Test.as");
InputStreamReader reader = new InputStreamReader(in);
ActionScriptFactory fact = new ActionScriptFactory();
ActionScriptParser parser = fact.newParser();
ASCompilationUnit unit = parser.parse(reader);

ASPackage pkg = unit.getPackage();
ASType type = pkg.getType();
List methods = type.getMethods();
for (Iterator i=methods.iterator(); i.hasNext(); )
{
ASMethod meth = (ASMethod)i.next();
System.out.println(meth.getName());
}[/java]

Learn more about metaas on the metaas homepage.

Post Metadata

Date
December 17th, 2006

Author
Aral

Category

Tags


6 Comments


  1. spender

    one of the things i miss the most from visual studio when I put my as3/eclipse hat on are the excellent refactoring tools. hopefully this kind of tool will bring some of that power to the eclipse environment. woo


  2. I use Java usually.
    I like Visual Basic…


  3. Thx for sharing this mate - very useful, I will give it a try


  4. I am not getting why ActionScript is not use to make a video sharing site.
    I really love the graphic and animation that you can create with flash but:
    How come you Spider can’t still read ActionScript?
    How come you need a flash streaming to host videos?
    Would flash be soon the king of internet or it will disappear?


  5. what about Android on Iphone?


  6. Great staff dude, If i could program, I will do an open source software that users can download to their mobile phone and customise it, so everyone would have a different interface


Leave a Reply



Bad Behavior has blocked 0 access attempts in the last 7 days.