Charts and mx components in a Flash Builder Burrito mobile project
Charts and mx components aren’t available in a “Flex mobile project” created with Flash Builder Burrito (preview release). But it is possible to include them in your mobile project if you really need them.
Attention: Charts and mx components aren’t optimized for mobile applications, that’s why Adobe didn’t include them. So only use them if you really have to.
mx components
To add the default mx components to your project, just add the mx.swc library to your project. This library can be found at the following location: %YOUR_FLEX_SDK_INSTALLATION%/frameworks/libs/mx
chart components
Adding the chart components to your mobile project requires some more steps:
- Add the mx.swc and datavisualization.swc libraries to your project
- mx.swc can be found at the following location: %YOUR_FLEX_SDK_INSTALLATION%/frameworks/libs/mx
- datavisualization.swc can be found here: %YOUR_FLEX_SDK_INSTALLATION%/frameworks/libs
- The mx namespace isn’t included in airmobile-config because of a bug in the Flash Builder Burrito preview release (see FB-28538). Therefore autocomplete for chart components won’t work in mxml files. A “workaround” for this bug is to add the namespace declaration manually to the root tag of your mxml file, like this:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:charts="mx.charts.*">
Once you’ve done these steps you should be good to go!