Change the 

NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway";) 

To 

NetServices.setDefaultGatewayUrl("http://domainnameofserver/flashservices/gateway";)

You have to remember that the flash ap runs in your browser.  The application 
needs to have the full domain when you are running remotely.

Mike


-----Original Message-----
From: Gary Strommen [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 6:42 PM
To: CF-Newbie
Subject: Flash Remoting with Coldfusion

Flash Remoting with Coldfusion

I have created a flash file that sends information to a coldfusion file (cfm).  
The CFM talks with a Microsoft access database, retrieves new information based 
off of the parameters that Flash has sent to it, then sends back to Flash new 
information.  It works locally but as soon as I post it to the server and try 
to run it through IE, it no longer works.  I cannot figure out why and have 
spent all day trying to figure it out.

Here is some of the code I am using from Flash:

import mx.remoting.*;                                                    

if (inited == null) { 
        inited = true;
        
NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway";)
        gateway_conn = NetServices.createGatewayConnection();
        myService = gateway_conn.getService("sonographycme.cfm", this);         
        //Location of *.as files
}

I read somewhere that the line:  
NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway";)
Only needs to be used for authoring purposes.  I am not sure if I should 
comment this line out before I post it to the server.  I have tried it both 
ways and I have not really noticed a difference.

Locally, I am running a coldfusion built in webserver for authoring purposes 
but on the server for publishing, it is running IIS6.  Not sure if this is 
causing an incompatibility issue either.

I am sure that the gateway is working locally AND on the remote production 
server as I can retrieve the “blank page” in both places.  If I put 
the fully qualified URL to the remote production server’s gateway, I can 
also get data from the gateway… However, when I post it and serve the 
pages from the same server, it will not pass data to the swf embedded in a CFM 
file.

As I have said before, I have been looking online for the solution all day and 
I have come up with several other forums where other people have come into the 
same problem but it never states how they have resolved it. Any help, as 
always, is greatly appreciated!




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:1985
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to