jActionScript是一个使用了JavaSWF2的Flash解析器和生成器。提供了一个基于对象模型的ActionScript字节码,并提供了ActionScript字节码统计工具。
示例代码
publicclassLinkExtractor{publicstaticvoidmain(String[]args)throwsIOException{GetUrlStackListenerl=newGetUrlStackListener();SimpleStackSimulatorv=newSimpleStackSimulator(l);SWFActionExtractextract=newSWFActionExtract(v);TagParserparser=newTagParser(extract);SWFReaderreader=newSWFReader(parser,args[0]);reader.readFile();}privatestaticclassGetUrlStackListenerextendsNullStackListener{publicvoidvisitGET_URL2(GetURL2Actionaction,Operandtarget,Operandurl){if(url.knownValue()){System.out.println("GET_URL2:"+url.getValue());}else{System.out.println("GET_URL2:(unknown)");}}publicvoidvisitGET_URL(GetURLActionaction){System.out.println("GET_URL:"+action.getURL());}}}
评论