Contents > Developing ColdFusion MX Applications > Using the Flash Remoting Service > Using Flash with ColdFusion components > Using component metadata with the Flash Remoting service PreviousNext

Using component metadata with the Flash Remoting service

Flash MX designers can use the Service Browser in the Flash MX authoring environment to discover business logic functionality built in ColdFusion. You use the description attribute of the cffunction and cfargument tags to describe the ColdFusion functionality to the Service Browser.

To create a ColdFusion component that describes itself to the Service Browser:

  1. Open flashComponents.cfc, and modify the code so that it appears as follows:
    <cfcomponent name="flashComponent">
       <cffunction name="helloWorld" access="remote" returnType="Struct" 
          description="Returns hello message">
          <cfset tempStruct = StructNew()>
          <cfset tempStruct.timeVar = DateFormat(Now ())>
          <cfset tempStruct.helloMessage = "Hello World">
          <cfreturn tempStruct>
       </cffunction>
    </cfcomponent>
    

    In this example, the description attribute of the cffunction tag supplies a short text description of the component method.

  2. Save the file.
  3. Open the Flash MX authoring environment, and open the Service Browser.
  4. If not already present, add your Flash Remoting service URL, such as http://localhost:8500/flashservices/gateway.
  5. To add the flashComponent service, enter helloExamples.flashComponent.
  6. When you click the getTime folder, the description appears in the Service Browser as shown in the following figure:
    This is a picture of the feature being described.
    .

Contents > Developing ColdFusion MX Applications > Using the Flash Remoting Service > Using Flash with ColdFusion components > Using component metadata with the Flash Remoting service PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/usingsa9.htm