You use Flash Builder or the Flex SDK to compile Flex applications into SWF files. To use the Flash Remoting Update, these programs must use the ColdFusion services-config.xml file when compiling the MXML.
You need to configure Flash Builder to use the ColdFusion configuration file, or specify the file when you use the SDK to compile your application (as described in Compile and Run the application).

Configure Flex Builder 2 to use the ColdFusion configuration file

When you use the Flex Builder Project Setup Wizard and select ColdFusion as the server type, the wizard configures Flex Builder to use the services-config.xml file for you. Use the following steps to configure your project:

  1. Select File> New> Flex Project to open the New Flex Project Wizard. and enter the appropriate information in the first sections of the Create a Flex project page.
  2. Select one of the radio buttons, as follows:
    • Select ColdFusion Flash Remoting to compile in Flex Builder.
    • If you installed LiveCycle Data Services with ColdFusion and want to use messaging or data management, select Flex Data Services.
  3. If you select Flex Data services, select whether to compile the application locally in Flex Builder or on the application server where the page is viewed. Do not select to compile code that you deploy on the server; this option is for development purposes only.
  4. Click Next and complete creating the project, then click Finish.

If you select Basic on the first Create a Flex Project page, and decide later to compile the application for use with ColdFusion, configure Flex Builder manually, as follows:

  1. Select Project > Properties.
  2. Select Flex Complier in the right pane of the Properties dialog.
  3. In the Additional Compiler arguments add -services=followed by the absolute path to the services-config.xml file in the local ColdFusion installation. For example, on a Windows system with a default ColdFusion stand-alone installation, specify the following argument string.

    -services=C:/ColdFusion9/wwwroot/WEB-INF/flex/services-config.xml

Configure Flex Builder 3 to use the ColdFusion configuration file

When you use the Flex Builder Project Setup Wizard and select ColdFusion as the server type, the wizard configures Flex Builder to use the services-config.xml file for you. Use the following steps to configure your project:

  1. Select File> New> Flex Project to open the New Flex Project Wizard. and enter the appropriate information in the first sections of the Create a Flex project page.
  2. In the Server technology section of the Create a Flex project page, select ColdFusion as the Application server type, and select Use remote object access service.
  3. Select one of the radio buttons, as follows:
    • Select ColdFusion Flash Remoting to compile in Flex Builder.
    • If you installed LiveCycle Data Services and want to compile the application on the server, select LiveCycle Data services in Flex Builder 3.
  4. Click Next to open the Configure ColdFusion page, and enter the required information. If you selected LiveCycle Data services in step 3, you can select to compile the application locally or on the server. Select to compile on the server only when you are developing your application, for convenience. Do not select to compile on the server code that you deploy, because the MXML page is not compiled to a SWF file until the user requests it, and the compiler does not create an HTML wrapper page.
  5. Click Finish to complete the configuration.

If you do not specify ColdFusion in the Server technology section of the Create a Flex project page, and decide later to compile the application for use with ColdFusion, configure Flex Builder manually, as follows:

  1. Select Project > Properties.
  2. Select Flex Complier in the right pane of the Properties dialog.
  3. In the Additional Compiler arguments add -services=followed by the absolute path to the services-config.xml file in the local ColdFusion installation. For example, on a Windows system with a default ColdFusion stand-alone installation, specify the following argument string.

    -services=C:/ColdFusion8/wwwroot/WEB-INF/flex/services-config.xml

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy