开发者

How do you use RSL with swc

开发者 https://www.devze.com 2023-04-13 09:01 出处:网络
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\"

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开发者_StackOverflow 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.


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:

[Embed(source="path/to/yourSwf.swf", symbol="theSymbolId")]
public var yourSymbol:Class;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号