Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / March 2007



Tip: Looking for answers? Try searching our database.

Flash Remoting and ColdFusion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
3Deviants - 07 Mar 2007 21:37 GMT
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 - 07 Mar 2007 21:52 GMT
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 - 15 Mar 2007 15:57 GMT
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 - 15 Mar 2007 17:53 GMT
Done.  The CF function writes out to the txt file just fine.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.