Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Remoting

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-27-2003, 01:14 PM   #1
fabioterracini
Registered User
 
Join Date: Jan 2003
Location: São Paulo, Brazil
Posts: 2
Default Flash Remoting Error Handling

Hello all,

I develop Flash Remoting + CFMX applications and I'm trying code a way so the application can be accessed in the intranet and the extranet, with the same code. This is, if can't establish a connection with the local server, connect with the remote server. The code i'm working on is below. Copy-and-paste in Flash for color-coding. :)

What happens is the following: If it connected to local server (intranet), it call's getMailings_Result() [automatically], and the application continues. If it can't establish a connection to the local server, it try to connect to the remote server, and it *really* connects (I see in output window that it received informations from the server), but it don't call the getMailings_Result() function, and the application don't continues as expected.

I hope I explained well and say thanks anticipatedly!



#include "NetServices.as"
if (inited == undefined) {
inited = true;

webservice_server = "TIKUNA";

NetServices.setDefaultGatewayUrl("http://tikuna/flashservices/gateway");
cfc_location = "contatos.qry.cfc_contatos";

gatewayConnection = NetServices.createGatewayConnection();
getMailingsServerCall = gatewayConnection.getService(cfc_location, this);
getMailingsServerCall.getMailings();
}

gatewayConnection.onStatus = function(status) {
// can't connect
// *try* to connect to remote server
trace("Can't connect to "+webservice_server);

webservice_server = "XINGU";

NetServices.setDefaultGatewayUrl("http://www.server.com.br/flashservices/gateway");
cfc_location = "intranet.contatos.qry.cfc_contatos";

gatewayConnection = NetServices.createGatewayConnection();
getMailingsServerCall = gatewayConnection.getService(cfc_location, this);
getMailingsServerCall.getMailings();
}

function getMailings_Result(result) {
// everything ok, connected at webservice
trace("Connected to "+webservice_server);
}
fabioterracini is offline   Reply With Quote
Old 02-24-2003, 02:22 PM   #2
Lynx75
Guest
 
Posts: n/a
Default

ive seen u r a developer for remoting.
Im looking for info how to connect flash direct with mysql without php.

have u got any idea how?

thanks,bye
  Reply With Quote
Old 02-25-2003, 11:09 AM   #3
fabioterracini
Registered User
 
Join Date: Jan 2003
Location: São Paulo, Brazil
Posts: 2
Default

I don't think it's possible to connect it directly do a database, without a application server (like coldfusion or php).

Anyway, take a look at server-side actionscript.

Good luck!
fabioterracini is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.