2009年4月12日星期日

flare编译问题

flare是一种创建数据可视化flash程序的actionscript库,采用apache-ant作为编译程序,具体操作见官方教程:http://flare.prefuse.org/tutorial。但是,由于flex-sdk的target-player参数设置问题,会造成在编译过程中提示以下错误:
Error: 找不到类型,或者它不是编译时常数: Vector。
或者
Type was not found or was not a compile-time constant: Vector.

这是因为编译时,默认支持的Flash Player的版本是9.0.124。遇到这种错误时,需要修改flex-sdk/frameworks/flex-config.xml,将<target-player>9.0.124</target-player>改为<target-player>10.0.12</target-player>。如果使用flexbuilder,可以通过Project > Properties > Flex Compiler 设置附加编译器参数-target-player=10.0.12。