the function, just declaring it. You need to invoke the function to get it
to work:
stop();
// Include the Required NetService class files
#include "NetServices.as"
// Connect to the Flash Remoting service
// Make the Gateway connection
NetServices.setDefaultGatewayUrl("http://www.lightwillrise.com:27000/flashse
rvices/gateway");
gatewayConnnection = NetServices.createGatewayConnection();
// path relative to webroot
svc = gatewayConnnection.getService("cfc.sendmail", this);
function insertIt() {
svc.sendMail();
}
// invoke the function
insertIt();
chris
________________________________________
From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 3:02 AM
To: CF-Talk
Subject: OT: flash remoting help
Hello
I'm playing with flash remoting to a cfc for the first time, and having a
few difficulties trying to get it all working...
Its on a shared hosting server, so within the flash I'm accessing the server
as follows (the coldfusion server runs on port 27000 so I'm assuming thatıs
the port for flash remoting!)
stop();
// Include the Required NetService class files
#include "NetServices.as"
// Connect to the Flash Remoting service
// Make the Gateway connection
NetServices.setDefaultGatewayUrl("http://www.lightwillrise.com:27000/flashse
rvices/gateway");
gatewayConnnection = NetServices.createGatewayConnection();
// path relative to webroot
svc = gatewayConnnection.getService("cfc.sendmail", this);
function insertIt() {
svc.sendMail();
}
The file sendmail.cfc im trying to access is found in a folder cfc within
the webroot... So is cfc.sendmail the right path to put in?
The sendmail.cfc file itself is very simple...
<cfcomponent>
<cffunction name="sendMail" access="remote" returntype="boolean">
<!--- validate and insert --->
<cfmail to="[EMAIL PROTECTED]" subject="blah" from="[EMAIL PROTECTED]">
test email
</cfmail>
<cfreturn true>
</cffunction>
Flash *seems* to connect to the server, but it just doesnıt seem to send the
email!! Any help gratefully received...
Ryan
________________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]