Hi, this is Sumedha. I am a Support analyst in the SDK group at ESRI. With the increasing popularity of the Sample Flex Viewer application, several users are seeking help to get started with this application in Flex builder.
I would like to focus on how to import the existing ‘Sample Flex Viewer’ project in Flex builder, in order to deploy and customize it further through the IDE.
Follow the steps below:
-
Here is the link to download the project: Sample Flex Viewer.
-
The source code present in ‘flexviewer-src-1.0.zip’ will be used in the Flex Builder IDE. Extract the contents of this zip file.
-
In Flex builder, click ‘File’ from the main menu. Click ‘Import’, and then select ‘Flex Project’ to open the ‘Import Flex Project’ dialog box.
-
Choose the ‘Project folder’ option and click the corresponding browse button.
Select the ‘FlexViewer’ folder from the following location as shown in the above screenshot: Project download location\flexviewer-src-1.0 > flexviewer-src-1.0 > FlexViewer. Click OK.
The screenshot for the ‘Import Flex Project’ dialog box is shown below:
-
Click Finish. The Flex Viewer Project is added to the Flex Navigator. Before executing the application, make sure that the project makes reference to the ArcGIS FLEX API library (.swc file). To specify the path in Flex Builder:
A. Right-click the project.
B. Click Properties.
C. Click Flex Build Path.
D. Click the Library Path tab.
E. Add the ArcGIS API for Flex Library using the Add SWC button.
-
Once the reference to the library is added, Click OK to all windows.
-
The application can be executed directly by selecting the project from the Flex Navigator and clicking the
‘Run Index’ button.
-
To deploy the Sample Flex Viewer application using your own compiled binary, the recommended extra step is to export a release build from the Flex Builder project. (Information based from the FlexViewerDevelopersGuide.pdf)
From Flex Builder, as shown above, you can select ‘Export Release Build’ from the Project menu. By default, a new folder called bin-release is created to store all the released files. Everything inside the bin-release will be part of your own release package. That means you can rename and zip or move this directory and deploy it as a regular Web application.
I hope this has helped you to get started using the Sample Flex Viewer Application in Flex Builder. Enjoy!
-Sumedha S., SDK Support analyst, ESRI Support Services