Getting started for developers

This page describes an older version, please read about the latest version at:
http://resources.arcgis.com/en/help/flex-viewer/concepts/

You should be familiar with:

You should have:

Getting the source code setup in Flash Builder onto your own machine.

  1. Download flexviewer-2.5-src.zip into a folder, e.g. "C:\Documents and Settings\jack\My Documents". Do not extract the files at this time.
  2. In Adobe Flash Builder, go to File -> Import -> Flash Builder project.
  3. Keeping "File" option selected, click Browse button.
  4. Select file downloaded in step 1, e.g. "C:\Documents and Settings\jack\My Documents\flexviewer-2.5-src.zip".
  5. The Extract new project to: textbox will be automatically set to location where the project source will reside, e.g. "C:\Documents and Settings\jack\Adobe Flash Builder 4.6\FlexViewer.
    CautionCaution:

    Do not put it onto your web server - you should separate the location of your application source code from your compiled output.

  6. Click Finish button. Project will be created and displayed in the Package Explorer window of Adobe Flash Builder, e.g. in this case FlexViewer.
  7. Download the API library and unzip it.
  8. From the unzipped API Library, copy the *.swc file into your Flash Builder projects "libs" folder.

Verify setup of Viewer

  1. Open the FlexViewer -> src -> (default package) folder
  2. Select index.mxml
  3. Now let's run it - there are multiple ways of doing this. One way is to click green triangle button on top. Another way is click Ctrl-F11. A third way is to click Run menu, then select Run Index.
  4. Browser will open and Flex Viewer application will be displayed.

As a best practice, you might want to follow below instructions for development

  1. Right click on this project (FlexViewer) -> Click Properties -> Click Flex Build Path.
  2. In the Output folder textbox at bottom, specify the location of your web server where your Flex Viewer should be deployed, e.g. in case of IIS web server, C:\Inetpub\wwwroot\flexviewerdebug.
  3. In Output folder URL text box , specify the URL that matches with your output folder specified in last step, e.g. http://localhost/flexviewerdebug/
  4. Click OK.
  5. Rebuild the project.
  6. Select the project and run it.
  7. Browser will open and Flex Viewer application will be displayed from a web site.

Compiler Performance Tip

  1. Only compile the Flex modules (a.k.a widgets) that you actually use. Go to Project -> Properties -> Flex modules and remove the widgets you don't use from this list. This will make your application faster.

General Performance Tips

2/15/2012