In this topic
- Create a new project using the
ArcGIS API for Flex
- Add the Flex API library
- Write code
- Additional References
Create a new project using the ArcGIS API for Flex
Before you can begin creating applications in the ArcGIS API for Flex you must first make certain that you have the working basics for your development environment. Please see the system requirements section detailing this.
To create a new project (application) using the ArcGIS API for Flex, follow the steps below:
- Download and unzip the ArcGIS API for Flex ZIP file. This file contains the ArcGIS API for Flex library (.swc), locales, a src folder containing the API skins, geoEnrichment source code and defaults.css, and helper files if working with OAuth authentication.
Be sure to either store the .swc file in the libs folder in your project or specify the library path in Adobe Flash Builder.
- In Flash Builder, select File > New > Flex Project.
- In the New Flex Project dialog, specify a project name, e.g. 'MyFirstApp'.
- Specify a project location or leave it at the default workspace location.
- Choose 'Web (runs in Adobe Flash Player)' as the application type.
- Choose a Flex SDK version making certain to adhere to the minimum requirements for the SDK as outlined in the System Requirements section, click Next.
- For the purpose of this tutorial, do not change the server technology type. The resulting web application will run from your output file location, by default this will reside in your workspace directory in a output folder called bin-debug, click Next.
- Keep the default Component set MX + Spark and the Framework linkage set to Use SDK default (runtime shared library), do not uncheck the checkboxes beneath.
- Keep the Main source folder as src and Main application file as <name provided in step 3>.
- For the scope of this tutorial, do not set an Output folder URL, click Finish.
Add the Flex API library
You now have a blank Flex project, but in order for us to work with and use the map component you need to reference the API you downloaded in step 1 above. You will add a library reference using the steps below.
- In the Package Explorer view, right-click the project and click
Properties. Alternatively, on the file menu, go to Project > Properties.
- On the left, click
Flex Build Path.
- Click the
- Click the
- Browse to the SWC file you unzipped earlier.
You are now ready to begin writing your application. Please proceed with the provided tutorials to get a better understanding of the various things you can do using the ArcGIS API for Flex.
You can also explore the ArcGIS API for Flex samples from GitHub.