
Setting up the project
Setting up the project essentially involves installing FusionCharts for Flex and then adding some resource files that are necessary for the project. Installing FusionChart for Flex is a simple copy-paste affair. FusionCharts for Flex comes as a SWC library module for Flex which can be fully integrated with the Flex Builder application, or it can be used as an external library for the free Flex SDK.
To set up FusionCharts for Flex just follow these simple steps:
- Get the FusionCharts for Flex module and extract the archive. The location where you have extracted the FusionCharts for Flex archive will subsequently be referred to as DISTRIBUTION_ROOT.
- Create a new Flex project with which you want to associate the FusionCharts for Flex module.
- Copy the FusionCharts.swc Shockwave component from DISTRIBUTION_ROOT/Charts to PROJECT_ROOT/libs folder.
- Copy the fusionwidgets folder from DISTRIBUTION_ROOT/Charts to the PROJECT_ROOT/src folder.
After setting up FusionCharts for Flex, just add the following resources to your project. You can get all the resources from WeatherWidget Source archive.
- Copy the images folder from the root of the archive to PROJECT_ROOT/src folder.
- Copy the Style.css and YahooWeatherData.as files from the root of the archive to PROJECT_ROOT/src folder. These files contain style definitions and static data that is needed for the project.
- Create a folder called data in PROJECT_ROOT/src. This folder will hold the XML definition for all your weather gauges.
Once you have followed the instructions mentioned above, the resulting folder structure would look similar to the one depicted in the image below. We have named the project as WeatherWidget – hence, a MXML file of the same name has been created automatically.


