all groups > macromedia flash flash remoting > october 2004 >
You're in the

macromedia flash flash remoting

group:

JUST GET ME CONNECTED


JUST GET ME CONNECTED stebennettsjb
10/5/2004 3:02:40 PM
macromedia flash flash remoting:
Hi, i've been making a website using cfcs flash remoting (on mx 2004) it works
great on my home computer using coldfusion developers edition...

Now i want to put it up on site... i have coldfusion web space and put all
files up as they where on my computer, nothing... i emailed my hosting
providers and they helped very little saying they didn't know what the problem
was as they had just moved me over to the flash remoting enabled server...

I know this its a Windows Server, (there not sure if port 8500 is open????)
there using IIS and the guy i spoke to had done something with JRUN to set up
the virtual root or something...

in my flash files i have always connected using


NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
var gagtlConnection:NetConnection = NetServices.createGatewayConnection();
var gagtlProxy =
gagtlConnection.getService("gem-a-shop.portal.gem-a.cf.calender", this);


any ideas what to change, i've been told the absolute path to your web folder
is: c:\inetpub\gem-a-shop.co.uk
i tried doing inetpub\gem-a-shop.portal.gem-a.cf.calender but that failed as
well...

the guy i was talking to said it might be something to do with the
setDefaultGatewayUrl

Any ideas anyone , i'd really appriate some help on this....
Re: JUST GET ME CONNECTED Pete
10/5/2004 4:59:26 PM
You shouldn't hard code in server names and ports like that... it won't be
localhost:8500 on your site for other people!

Also, you have to make sure that the hostname that you use in the gateway
URL matches the URL used to load the SWF file - otherwise the Flash Player
won't let you make a remote connection to the gateway.

When you publish the flash movie in an HTML object tag, do you use a
ColdFusion page? If so, then you can dynamically set the gateway URL using
"flashvars" as a param to the HTML object tag.

See Tom Muck's comments on how to deal with this in CFMX:

http://www.flash-remoting.com/notablog/home.cfm?newsid=71




[quoted text, click to view]
NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gatewa
y");
[quoted text, click to view]

Re: JUST GET ME CONNECTED stebennettsjb
10/7/2004 10:32:35 AM
hi sorry you losing me a bit....

can you show me an example of the AS that would work??? ie what to change this
to

//Create remoting connection

NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
var gagtlConnection:NetConnection = NetServices.createGatewayConnection();
var gagtlProxy = gagtlConnection.getService("gem-a.portal.gem-a.cf.agtc",
this);

for getService, do i start with at the webRoot of my site (where my index.htm
page???

for the setDefaultGatewayUrl, can i put my web site :8500, i know the name of
the server is NickRiviera.hostinguk.net, but i've tried


NetServices.setDefaultGatewayUrl("http://NickRiviera.hostinguk.net:8500/flashser
vices/gateway"); with no sucess...

thanks for your help
Re: JUST GET ME CONNECTED mattarm
10/8/2004 1:21:42 AM
You probably don't need the :8500 in the url as this is specific to your local
vsersion of ColdFusion.

Another thing that you may have to get the provider to make sure the ISAPI
settings are correct on thier IIS server. You can find a technote about this at:

http://www.macromedia.com/support/flash_remoting/ts/documents/iis_gateway_connec
tion.htm

A simple test you can perform to check your flashgateway is to navigate a
browser to the gateway address at which you should either see a blank page (no
error message) or a prompt to download.

I have tried http://NickRiviera.hostinguk.net/flashservices/gateway and it
seems to work fine so it is probably just an addressing issue with your code.
Try dropping the :8500

Hope it helps
Matt
Re: JUST GET ME CONNECTED Pete
10/8/2004 2:10:19 PM
Can you try not using a server name or port at all?

You should NEVER hard code in server names like localhost because you can't
guarantee how people will load your SWF... and when you post it on a
website, localhost is everyone's local address, not your web server.

Just say you put your SWF into an HTML web page at this location:

http://nickriviera.hostinguk.net/applications/somepage.htm

but just say the host had another name, or someone accessed it via it's IP
address?

http://apps.hostinguk.net/~nickriviera/applications/somepage.htm
http://123.123.123.123/~nickriviera/applications/somepage.htm

Assuming you've just specified the SWF file in the HTML Object tag relative
to the location of the HTML file, whatever address was used to load the HTML
page will also be used to get the SWF. If you've never thought about what
goes on when you publish a SWF in an HTML page - this might be a surprise to
you. The first request will be for the HTML. This is returned by the
webserver to the browser. The browser parses the HTML and then it notices a
request for a SWF in an HTML Object tag... this means the browser makes
another HTTP GET request for the SWF... which means it will most likely use
the same host name and path to the SWF as for the HTML page. This is no
different to how GIFs and JPGs are retrieved in separate requests when the
browser encounters an HTML IMG tag.

The reason this is important to understand is due to the security sandbox
restrictions of Flash Player 7. It will not let you connect to a different
hard coded URL as http://nickriviera.hostinguk.net/flashservices/gateway
from those other HTML pages because "nickriviera.hostinguk.net" is not the
same name as "apps.hostinguk.net" or "123.123.123.123" in terms of strict
domain checking.

Try setting the gateway to just "/flashservices/gateway" or wrapping it in a
call to NetServices.getHostUrl() to get the host name and port used to load
the SWF... this way, Flash Remoting will work in any environment...
localhost or your live site.

Pete

Re: JUST GET ME CONNECTED stebennettsjb
10/11/2004 10:54:25 AM
hi Pete,

i think iget most of what your saying...

All the flash files are loading into one html page...if that makes any
difference...

can you actually show me an example of what i need to put in instead of


NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
var gagtlConnection:NetConnection = NetServices.createGatewayConnection();
var gagtlProxy =
gagtlConnection.getService("gem-a-shop.portal.gem-a.cf.calender", this);


and any help on the getService(), as in do i start from where ,my index page
is so it would be the above ("gem-a-shop.portal.gem-a.cf.calender",this) or do
i start somewhere else???

Thanks to everyone....


Re: JUST GET ME CONNECTED stebennettsjb
10/11/2004 11:21:55 AM
Hi thanks Peter and mattarm.....

i've finally got it show the info from CFC....which is great....

now to have a go at the tutorial and get the info from a cfm page....

Re: JUST GET ME CONNECTED Pete
10/11/2004 2:21:58 PM
You could try this...

NetServices.setDefaultGatewayUrl(NetServices.getHostUrl("/flashservices/gate
way"));
var gagtlConnection:NetConnection = NetServices.createGatewayConnection();
var gagtlProxy =
gagtlConnection.getService("gem-a-shop.portal.gem-a.cf.calender", this);

AddThis Social Bookmark Button