Compile Flash API

with Maven

Prerequisites :

Steps :

  • Download the Flash API's source codes : geoportalMinOpenscales.zip. Extract files.
  • Open a console, go to the directory geoportalMinOpenscales.
  • Type the following command :
    mvn -e clean install package

    The final .swf will be in the directory geoportalMinOpenscales/geoportail-api-fx-examples/target. You may have to rename the file according to his name in the html file. The final .swc will be in the directory geoportalMinOpenscales/geoportail-api-core/target.

with Flash Builder

Create a Flex project in Flash Builder

Open FlashBuilder, File/New/Flex Project.

Give a name to the project. Here, it will be called 'projet_api_geoportail'.

Get the librairies

  • Download the Openscales library. Extract and copy files in the package libs of your project.
  • Download the Greensock library. Click on "Download AS3". Extract files. Copy the geensock.swc file in the package libs of your project.

Install the Flash API's source codes

  • Download the Flash API's source codes : geoportalMinOpenscales.zip. Extract files.
  • Copy geoportail-api-core/src/main/flex/assets in the src package in the Flash Builder project.
  • Copy geoportail-api-core/src/main/flex/core in the src package.
  • Copy geoportail-api-fx/src/main/flex/fx in the src package and rename it into fx.component.
  • Copy the files from geoportail-api-fx/src/main/flex/assets in the assets package.
  • Copy the files from geoportail-api-fx-examples/src/main/flex/assets in the assets package.
  • In the mxml file (here projet_api_geoportail.mxml), copy the code from geoportail-api-fx-examples/src/main/flex/geoportalFxStd.mxml file.

    The project will look like the following arborescence :