views:

403

answers:

1

If I have an *.as file that is my custom component, a SWC class that contains the custom components skins and a css file that tells the custom class how it should look (references the SWC skin file), how do I set up a library project (using flexbuilder 3) to generate a single SWC file that will contain everything?

+1  A: 

sorry to answer my own question, but I found the answer to be that I can ignore the CSS file. Make sure that the SWC with the skins is located in the library path of your library project, then just reference it by using the embed metadata tag.

e.g.

[Embed(skinClass="My_Slider_trackSkin")]
 private var trackSkin : Class;

then just use set style and then when you load the component in another project it will default to the correct skin.

this.setStyle('trackSkin', trackSkin);
Please accept your answer after you answer it. It helps keep the site cleaner.
Jrud