如何将 RSL 与 swc 一起使用
设置如下:
1) 我有一个 SWF,其中我在库中定义了一个组件,并使用自定义类作为链接。该组件已设置为“导出以运行时共享”
2) 我有一个 fla,我在其中复制了该组件并通过“导入以运行时共享”链接到第一个 SWF。该 fla 将作为 SWC 发布。该 fla 的内容驻留在我提供链接的影片剪辑中,以便我可以在其 lib 路径中具有 SWC 的应用程序中实例化它。
3) 我有一个 Flex 应用程序,已将 SWC 添加到其库路径中。
当我运行 Flex 应用程序时,我的 RSL 组件根本无法工作。
This is the setup:
1) I have an SWF in which I have defined a component in the library with a custom class as the linkage. The component has been set up for "export for run time sharing"
2) I have an fla where I copied over the component and linked to the first SWF via "import for run time sharing". This fla will be published as a SWC. The content of this fla resides in a movieclip to which I give a linkage so I can instantiate it in the app that has the SWC in its lib path.
3) I have a flex application that has the SWC added to its library path.
When I run my flex application, my RSL component does not work at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要创建一个 swc,那不是 RSL。 RSL 意味着您正在使用编译的 SWF 在应用程序中包含符号。 SWC 只是编译类(库)的集合,不包含任何特定的运行时符号信息。另外,我不认为 Flash 会实现传统 Flex 意义上的 RSL。
我相信您想要做的是添加与 FLA 中相同的选项,但从中创建一个 swf。从那里,您可以通过执行以下操作将所需的符号嵌入到 Flex 中:
If you're creating a swc, that's not RSL. RSL means you're using a compiled SWF to include a symbol in your application. A swc is just a collection of compiled classes (library) that does not hold any specific runtime symbol information. Plus, I don't think Flash does RSL in the traditional flex sense.
I believe what you want to do is add the same options you have in you FLA, but instead create a swf from it. From there, you can embed the symbol you want in flex by doing this: