Simple hello world example. Create a new fla, stick this on frame 1:

import mx.remoting.*;
import mx.remoting.debug.*;
import mx.rpc.*;
import mx.services.*;

responder = new RelayResponder(this, "onResult", "onFault");
service = new Service("http://127.0.0.1:8100/flashservices/gateway/";, null,
"helloWorld", null, responder);
service.sayHello();

onResult = function(event:ResultEvent)
{
    trace(event.result);
}

onFault = function(event:FaultEvent)
{
    trace("FAULT CODE: " + fault.fault.faultcode);
    trace("FAULT STRING: " + fault.fault.faultstring);
    trace("DESCRIPTION: " + fault.fault.description);
    trace("TYPE: " + fault.fault.type);
    trace("DETAIL: " + fault.fault.detail);
}

Make sure to change the gateway URL to your setup. Here's the CFC:

<cfcomponent>
    <cffunction name="sayHello" access="remote" returntype="string">
        <cfreturn "hello">
    </cffunction>
</cfcomponent>

chris


+ Chris Kief
  Mindflood, Inc.
  714.557.2488 x113
  
  www.mindflood.com



On 4/14/05 1:35 PM, "Bryan Stevenson" <[EMAIL PROTECTED]> wrote:

> That would be great Chris....damn MM should update their sample apps...or at
> least warn ya!! ;-)
> 
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> phone: 250.480.0642
> fax: 250.480.1264
> cell: 250.920.8830
> e-mail: [EMAIL PROTECTED]
> web: www.electricedgesystems.com
> ----- Original Message -----
> From: "Chris Kief | Mindflood" <[EMAIL PROTECTED]>
> To: "CF-Talk" <cf-talk@houseoffusion.com>
> Sent: Thursday, April 14, 2005 1:25 PM
> Subject: Re: CF 7 and Flash Remoting
> 
> 
>> Brian,
>> 
>> Since you're using the AS2 classes, you no longer #include NetServices.
>> There is a whole new approach.
>> 
>> 
>> I'll send a simple example in a minute...
>> 
>> chris
>> 
>> 
>> + Chris Kief
>>  Mindflood, Inc.
>>  714.557.2488 x113
>> 
>>  www.mindflood.com
>> 
>> 
>> 
>> On 4/14/05 1:18 PM, "Bryan Stevenson" <[EMAIL PROTECTED]>
>> wrote:
>> 
>>> NetServices.as: File not found. is the error
>>> 
>>> var server =
>>> NetServices.createGatewayConnection("http://127.0.0.1/flashservices/gateway";
>>> );
>>> Is probably the line that needs to be fixed up??
>>> 
>>> I haven't touched remoting in over a year....I know this is where I had
>>> trouble before.
>>> 
>>> I've got Flash MX 2004 Pro installed with ActionScript 2.0 Flash Remoting
>>> Components and the UI component set 2.
>>> 
>>> I'm trying to fire up the Noteboard tutorial from MMs site.
>>> 
>>> Any thoughts?
>>> 
>>> Cheers
>>> 
>>> Bryan Stevenson B.Comm.
>>> VP & Director of E-Commerce Development
>>> Electric Edge Systems Group Inc.
>>> phone: 250.480.0642
>>> fax: 250.480.1264
>>> cell: 250.920.8830
>>> e-mail: [EMAIL PROTECTED]
>>> web: www.electricedgesystems.com
>>> 
>>> 
>> 
>> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202871
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to