Apache Flex 中的远程可扩展图形?

Remote scalable graphics in Apache Flex?

我有一个基本的 Flex 应用程序,它使用 s:Image 标签显示远程图像。根据the documentation, s:Image is constrained to PNG, GIF and JPG filetypes. I would like to include a scalable graphics format (SVG or PDF; the graphics are generated by Python/cairo) instead. I see that I can embed SVGs在编译时的Flex应用程序中,但是图像内容是实时生成的并且必须是远程的。

Flex 是否具有包含远程 SVG 或 PDF 图形的机制?

遗憾的是,您只能嵌入 SVG,但不能在运行时将其加载到图像组件中。但是您可以尝试这些加载 SVG 文件并将它们转换为 AS3 显示对象的库。我没有尝试过,但它们似乎相当容易使用: https://github.com/LucasLorentz/AS3SVGRenderer http://www.as3gamegears.com/misc/as3svgrenderer

或者,您可以只在服务器上生成位图图像 (JPEG/PNG) 并加载它们,但自然最好在客户端处理它以减少服务器负载