Groups | Blog | Home
all groups > macromedia flash flash remoting > march 2007 >

macromedia flash flash remoting : Flash Remoting and ColdFusion



3Deviants
3/7/2007 9:37:55 PM
I'm trying to implement some Flash Remoting in a Flash project to talk to a
ColdFusion MX 7 back end. My code to see if it's working or not is really
really simple:

My actionScript:
import mx.remoting.Service;
var myCFCService = new Service("http://192.168.1.199/flashservices/gateway",
null, "admin.components.test", null, null);
myCFCService.test();

My coldFusion CFC:
<CFCOMPONENT>
<CFFUNCTION NAME="test" ACCESS="REMOTE" OUTPUT="FALSE" RETURNTYPE="VOID">
<CFFILE ACTION="append" ADDNEWLINE="yes" FILE="C:\T.TXT" OUTPUT="#now()#">
</CFFUNCTION>
</CFCOMPONENT>

My CFC exists in the admin/components directory of the web root of my testing
server which is at 192.168.1.199 and is called test.cfc. My T.TXT file exists
and is currently empty on the root of the C:\ drive.

Can anyone tell me why the CFC doesn't DO anything when it's called?

3Deviants
3/7/2007 9:52:32 PM
And by "doesn't DO anything" I mean that when I run my SWF, it doesn't give me
any connection errors or the like, so I think the Flash is talking to the CFC
just fine. There are no timestamps in my t.txt file though, which is all the
CFC does.
phil ashby
3/15/2007 2:57:07 PM
try invoking the component from CF to see if it works before calling it from
Flash

create a new CFM page with this

<cfinvoke component="test" method="test"></cfinvoke>

assuming your component is called test... If you still don't get anything in
your t.txt file, then it's the CF thats the problem, not the call between CF
and Flash
3Deviants
3/15/2007 4:53:19 PM
AddThis Social Bookmark Button