We have integrated FusionCharts and FusionWidgets with the Flash Builder development environment as an external library module. For FusionCharts/FusionWidgets to function properly, a mandatory directory structure has to be present with respect to project settings / build properties.
The following steps will guide you through the process of integrating FusionCharts for Flex with Flash Builder 4:
Note: These instructions assume that Flash Builder 4 is set to default configuration.
FusionCharts.swc
Shockwave Component from the DISTRIBUTION_ROOT/Charts/swc/FlexSDK4
folder to PROJECT_ROOT/libs
folder. The DISTRIBUTION_ROOT
is the location where you have downloaded and extracted the FusionCharts for Flex archive. fusioncharts
and fusionwidgets
folders from the DISTRIBUTION_ROOT/Charts
folder to PROJECT_ROOT/src
folder. These folders contain all the Flash chart/widget objects.The FusionCharts.swc file acts as the library for both FusionCharts and FusionWidgets. It adds FusionCharts and FusionWidgets custom components to the Components
window. The FusionWidgets functionality was added to the SWC in version 1.1.
Once you have added FusionCharts for Flex module to your Flex project, the resulting folder structure will look similar to the figure given below:
Note: Here, we have created a project named FusionCharts. So, an MXML file of the same name will automatically be created in the src folder.
To learn how to change the default location of the charts/widgets SWF files, please go through the Changing the SWF Folder page in "Your First Chart" section.