Note: This tutorial was created based on ColdFusion 8 and Flash Builder 4 beta 1. Though it still applies to ColdFusion 9, minor changes in the description and code may be necessary before it can be applied to Flash Builder 4 beta 2.
As an experienced ColdFusion developer, you have worked with URL, Form, and other types of variables to dynamically update data in your applications in response to user interactions. Using the concepts in this tutorial, you can easily embed your Flex application code in a CFM page and pass ColdFusion variables to it that will appropriately update the display.
In this tutorial, you will build the Fictitious Quarterly Sales Planner application shown in Figure 1. After you set up the database and review the provided CFC, you will lay out the ColumnChart control using Adobe Flash Builder 4 beta. Next, you will bind data to the control from a service operation that is mapped to a ColdFusion component (CFC) function.

Figure 1. The Fictitious Quarterly Sales Planner Flex and ColdFusion application.
The header of the application (with the logo, welcome message, and region tabs) is built with ColdFusion, HTML, and cascading style sheets (CSS). As a user clicks each region tab, he will pass a URL variable to the application, which will refresh the chart display with that region's information. Note that the figure shows the specified region variable in the URL string.
This tutorial does not attempt to replace ColdFusion charts with charts built using Flash Builder 4 beta. You will want to use Flash Builder for much more interactive displays that cannot be created using ColdFusion alone. However, for simplicity's sake, you are building a straight-forward chart example to strip away any complexities in learning how to embed the SWF file into a CFM page and how to pass URL variables into the HTML embed code that, in turn, passes the variables into the application.
In order to make the most of this article, you need the following software and files:
In order to successfully complete this tutorial, be sure to set up and test your environment as outlined in Getting started with ColdFusion and Flash Builder 4 beta:
You can skip the steps above if you have already successfully completed the "Getting started with ColdFusion and Flash Builder 4 beta" tutorial or any other tutorial in this series.
This tutorial was intended for:
Trilemetry, Inc is a development and education organization that implements a human-centered design approach to the creation of software and content. Their Adobe portfolio includes the Adobe ColdFusion Getting Started Experience, the Adobe Flex Getting Started Experience, the Flex in a Week video series, the official Adobe instructor-led training course Flex 3: Extending and Styling Components and more. They also create and support many Web applications from interactive Flash sites and corporate web sites to mission-critical business applications.