Search Flex Samples

Creating Flex projects

Creating a Flex project with no server

If you do not have a server to configure, this basic configuration lets you specify the output folder for your compiled Flex application. You can optionally set the build paths for your new project.

  1. Select File > New > Flex Project.
  2. Enter a project name,
  3. Select the project location. The default location is the workspace, which is My Documents\Flex Builder 3\project_name (for example, C:\Documents and Settings\Flex Developer\My Documents\Flex Builder 3\myFlexApp). To choose a different project location, deselect the Use Default Location option.
  4. Choose the application type (web or desktop).
  5. For application server type, choose None.
  6. Click Finish or click Next to select more configuration options.
  7. (Optional) Specify the output folder for your Flex application, and then click Finish.
  8. (Optional) Click Next to set the build paths for your new project. Click the Source Path and Library Project tabs to specify main source folder, main application file, output folder, and output folder URL.
  9. Click Finish to create your project.

Creating a Flex project with ASP .NET

With Microsoft Windows and Microsoft Visual Web Developer installed, you can create Flex projects that use ASP .NET for deployment. Also, if you have access to an Internet Information Service (IIS) development server, you can create Flex projects with a Flex output folder under IIS.

  1. Select File > New > Flex Project.
  2. Enter a project name.
  3. Specify the project location. The default location is the workspace, which is My Documents\Flex Builder 3\project_name (for example, C:\Documents and Settings\Flex Developer\My Documents\Flex Builder 3\myFlexApp). To choose a different project location, deselect the Use Default Location option.
  4. Choose the application type (web or desktop).
  5. For application server type, choose ASP .NET.
  6. Click Next.
  7. Select the ASP .NET server:
    • If you are using an ASP .NET Development Server, there is no need to specify a server location.
    • If you are using IIS, enter the web root and root URL.
  8. (Optional) Click Next to set the build paths for your new project. Click the Source Path and Library Project tabs to specify main source folder, main application file, output folder, and output folder URL.
  9. Click Finish to create the project.

Creating a Flex project with J2EE

This project configuration lets you create Flex projects that use a J2EE servlet with the remote object access service option. When no option is selected, and Java server is used, a Flex output folder is created under the server root. If you installed the Eclipse Web Tools Project (WTP) plug-in, you can create combined Java and Flex projects with or without remote object access service.

Note: To use LiveCycle Data Services ES in your Flex projects, you must have LiveCycle Data Services ES installed.

You have two compile options for creating a Flex project that uses J2EE. The recommended option compiles the application locally, and then saves the files (including the SWF file and HTML wrapper) on the server. The other option compiles the application source file directly on the server.

  1. Select File > New > Flex Project.
  2. Enter a project name.
  3. Specify the project location. The default location is the workspace, which is My Documents\Flex Builder 3\project_name (for example, C:\Documents and Settings\Flex Developer\My Documents\Flex Builder 3\myFlexApp). To choose a different project location, deselect the Use Default Location option.
  4. Choose the application type (web or desktop).
  5. For application server type, choose J2EE.
  6. Select the Use Remote Object Access Service option. LiveCycle Data Services ES are automatically selected. If you installed WTP, you can also choose to create a combined Java and Flex project that uses WTP (the Java source folder is selected for you).
  7. Click Next.
  8. Configure the J2EE server.
    • If you selected the Use Remote Access Service and LiveCycle Data Services options, specify the root settings:

      Root Folder is the Flex server (web application) that serves your application (for example, C:\fds2\jrun4\servers\default\flex). If you choose not to use the default Flex development server option, you can specify a new location for the root folder, but it must be a valid folder that is mapped to the specified root URL. If you are using a remote server, specify the location; for example, myServer\MyApplications\jrun4\servers\default\flex.

      Root URL is a valid root URL of the Flex server (web application) that serves your application. The default root URL for local server instances is http://localhost:8700/flex/. If you use a remote server, the URL might look like this: http://myserver.com:8700/flex/.

      Context Root should typically match the last segment of the root URL path.

    • If you selected the Create Combined Java/Flex Project Using WTP option (with or without LiveCycle Data Services):
      • Specify the names of your Java and Flex source folders and target runtime.

      When you create a Flex project with LiveCycle Data Services ES, Flex Builder either creates a directory with the same name as your project, or uses an existing directory with that name. That directory is a subdirectory of the root folder that you specified for the project.

      • With LiveCycle Data Services ES, specify a flex.war file, which is located in the server installation folder.
  9. Specify the location to compile your project.
    • For applications that compile locally, Flex Builder creates a projectname-debug folder in which the SWF files and HTML wrappers are saved.
    • For applications that compile on the server, the project location must be on the server.
  10. (Optional) Click Next to set the build paths for your new project. Click the Source Path and Library Project tabs to specify main source folder, main application file, output folder, and output folder URL.
  11. Click Finish to create your project.

Note: Regardless of which option you choose for a LiveCycle Data Services ES project in Flex Builder, you must specify a valid LiveCycle Data Services ES root folder and root URL. These values map the root of a LiveCycle Data Services ES web application. If you deselect the options, you must enter only your web root and root URL.

Creating a Flex project with ColdFusion

To access data that uses ColdFusion, you must have ColdFusion MX 7 Updater 2 (7.0.2) or Adobe ColdFusion 8. You can optionally install the ColdFusion Extensions for Flex Builder. For more information, see the ColdFusion product page.

  1. Select File > New > Flex Project.
  2. Enter a project name.
  3. Specify the project location. The default location is the workspace, which is Documents and Settings\username\workspace\.
  4. Specify the application type (web or desktop).
  5. For application server type, select ColdFusion, then choose the following options:

    Use Remote ObjectAccess Service If you deselect this option, the Flex output folder is under the ColdFusion web root or virtual folder. You must enter only your web root and root URL.

    If you select this option, you have the following choices:

    LiveCycle Data Services The Flex output folder is under the ColdFusion web root or virtual folder. Additionally, you can choose whether your project is compiled in Flex Builder (recommended, because this option generates an HTML wrapper) or whether your project uses the web-tier compiler. Flex Builder adds fds.swc to the library path. If you use the web-tier compiler, the project must be located under the ColdFusion web root.

    ColdFusion Flash Remoting The Flex output folder is under the ColdFusion web root or virtual folder.

  6. Click Next to configure the ColdFusion server.
  7. Choose the server location and compilation options.

    Select the ColdFusion installation type: Standalone or Deployed to J2EE server.

    Click Validate Configuration to ensure the setup is correct, then click Next.

  8. (Optional) Click Next to set the build paths for your new project. Click the Source Path and Library Project tabs to specify main source folder, main application file, output folder, and output folder URL.
  9. Click Finish.

Creating a Flex project with another server

If you have another type of server to configure, one that is not listed on the server type pop-up menu, this basic configuration lets you specify the output folder for your compiled Flex application. You can optionally set the build paths for your new project.

  1. Select File > New > Flex Project.
  2. Enter a project name, and then select the project location.
  3. Choose the application type (web or desktop).
  4. For server type, choose Other.
  5. Click Finish or click Next to select more configuration options.
  6. (Optional) Specify the output folder for your Flex application, and then click Finish.
  7. (Optional) Click Next to set the build paths for your new project, and then click Finish.

0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples