How do you use RSL with swc

343 views Asked by At

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.

1

There are 1 answers

2
J_A_X On

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;