Greg's Blog

helping me remember what I figure out

Dynamic Gateway Connection

| Comments

I always found the documented method for connecting to the gateway is a little bit backward as it required you to hard code the URL to the gateway, e.g. http://yourDomain/flashservices/gateway.

Now obviously when you have different servers for say development and production this is less than ideal, unless we could always guarantee that the specified URL would be available, which in our case we couldn’t. So here is the work around courtesy of Flash-remoting.com (you can view full article here ). Basically this sets a variable on the template that holds your Flash movie that can be passed into your movie. In your movie you set a default value which is overridden if it (the var) is passed in. The only thing to note is that the example I believe makes a mistake: the variable name in the Flash movie should have been called gatewayUrl not myURL as is stated. Also be sure to use setDefaultGatewayUrl not setDefaultGatewayURL.

You can review errors caused by Flash Remoting in a log file in CFIDE/administrator called flash.log. I also just noticed that when you run CFMX from the command line (in my case using a JRun instance) you can trace all of the component method calls on screen.

And finally there was also a little pointer to some Flash Remoting connection issues using web services.