title: Returning results from remoteobject class to parent
body: <p>I have a Flex application using ColdFusion to retrieve data from MS SQL. I'm trying to create a class where I can send in a numeric argument and it returns a value to the document calling the class. </p>
  
  <p><strong>This is my class</strong></p>
  
  <pre><code>package com.procost
  {
  import mx.controls.Alert;
      import mx.core.FlexGlobals;
      import mx.rpc.AbstractOperation;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.remoting.RemoteObject;
  
      public class EmailListRetrieve
      {
          public var emailListId:Number = -1;
  
          public function send():void{
              //Create the remote object
              var _remoteObject:RemoteObject = new RemoteObject('test');
              _remoteObject = new RemoteObject("ColdFusion");
              _remoteObject.endpoint = "http://" + FlexGlobals.topLevelApplication.endPointLink + "/flex2gateway/";
              _remoteObject.source = FlexGlobals.topLevelApplication.remotePath + "services.general";
              _remoteObject.showBusyCursor = true;
  
              //Send
              var op:AbstractOperation = _remoteObject.getOperation('getEmailList');
              op.addEventListener(ResultEvent.RESULT, result);
              op.send(this);
          }
  
          // Result from CFC
          private function result(event:ResultEvent){
              Alert.show(event.result.toString());
          }
      }
  }
  </code></pre>
  
  <p>**This is how I'm calling it from my MXML **</p>
  
  <pre><code>import com.procost.EmailListRetrieve;    
  
  public function fncClick():void{
           var request:EmailListRetrieve = new EmailListRetrieve();
           request.emailListId=1;
           request.send();
      }
  </code></pre>
  
  <p>The result function in my class is returning all the data I need from the DB. The issue is, how do I get this data back into the MXML document I called it from?</p>
  
  <p>Any help would be appreciated. </p>