简体   繁体   中英

How do you use RSL with swc

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.

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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