简体   繁体   English

Flex 4 Air 2 RSL(运行时共享库​​)

[英]Flex 4 Air 2 RSL (Runtime Shared Libraries)

Has anyone got any experience will loading SWC / SWZ's at runtime within a Flex 4 / Air 2 desktop application? 有没有人有任何经验可以在运行时在Flex 4 / Air 2桌面应用程序中加载SWC / SWZ?

The very rough idea would be to have a desktop Air app, which is able to "download" additional modules (eg, a SWZ/RSL representing a form) and load these at runtime? 一个非常粗糙的想法是拥有一个桌面Air应用程序,它能够“下载”其他模块(例如,代表表单的SWZ / RSL)并在运行时加载这些模块?

Imagine the App is configured using an XML file obtained over the net. 想象一下,该应用程序是使用通过网络获取的XML文件进行配置的。 When this has instruction to get a new module (SWZ/RSL), the app will download the module to its App Storage folder, and instanciate it at runtime? 当此指令指示获取新模块(SWZ / RSL)时,应用程序会将模块下载到其“应用程序存储”文件夹中,并在运行时实例化该模块吗?

The Flex Manual seems to indicate this is possible, but is talking web rather than desktop http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fd1.html Flex手册似乎表明这是可能的,但它是在网络上而不是在桌面上http://help.adobe.com/zh_CN/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fd1.html

Can anyone offer any advise? 谁能提供任何建议? Has anyone got any experience, or knows of some walkthroughs / code examples? 有没有人有任何经验,或者知道一些演练/代码示例?

Thanks, 谢谢,

Henry 亨利

You will probably want to use Flex Modules for this. 您可能需要为此使用Flex模块。 Here is an old blog that walks through using Modules in an AIR app: 这是一个古老的博客,逐步介绍了如何在AIR应用程序中使用模块:
http://blogs.adobe.com/emalasky/2008/04/remote_plugins.html http://blogs.adobe.com/emalasky/2008/04/remote_plugins.html

Just expanding on what James wrote - Modules are the way to go here. 只是扩展James撰写的内容-模块是解决问题的方法。

And, although the docs for modules talk about a web scenario, there's no reason this wouldn't work with AIR also. 而且,尽管模块文档讨论的是Web场景,但是没有理由这也不适用于AIR。

You might need to write some custom code to first check to see if the module already exists in the local storage, and if not, download it and store it. 您可能需要编写一些自定义代码来首先检查本地存储中是否已经存在该模块,如果不存在,请下载并存储它。 However, from there, you should be good-to-go. 但是,从那里开始,您应该很擅长。

However, remember that this approach you won't get the native updater behaviour you get out-of-the-box with AIR. 但是,请记住,使用AIR开箱即用时,这种方法不会获得本机更新程序的行为。 You'd need to roll-your-own support for checking to see if a newer version of a module thats been previously cached is available. 您需要自己动手支持以检查是否有以前缓存的模块的新版本可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM