Skip to content

How to use FlatSpark in your project

Mahmoud Ali edited this page Jan 31, 2015 · 4 revisions

FlatSpark was donated to Apache Flex

All the information in this wiki is outdated, if you want to get updated information on how to use FlatSpark you should check Flex's official wiki here


##1. Add the .swc to your project. Just add the .swc file to your project just like any other Flex library. More information

##2. Apply the skin We make sure it is up to you to choose which components you want to skin, but we also give you an easy way to change all your existing Spark components skin through CSS.

If you want to change just one component:
You can just change the skinClass attribute:

<s:RadioButton label="Test 2" selected="true" skinClass="flatspark.skins.RadioButtonSkin"/> 

This way you can have as many different skins as you wish in your application, if that's what you need.

If you want to change all spark components at the same time:
You just need to add a CSS rule:

s|RadioButton {
    skinClass: ClassReference("flatspark.skins.RadioButtonSkin");
} 

The CSS definition follows Flex rules, so if you define it in a global CSS it will change all your spark components with the chosen skin.
If you define it in your MXML Component, then it will apply to all your spark components inside your MXML component only.