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 / June 2006



Tip: Looking for answers? Try searching our database.

Remoting Works then Stops

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SirIssac - 15 Jun 2006 18:13 GMT
I've got a remoting issue that has stumped me for a full day. I have a game
that consumes about 10 web services written in AMFPHP.  All remote calls work
fine in AS1 from anywhere in the game.  I recently ported my Flash game to
ActionScript2 in order to include the SmartFox multiplayer engine. Now that
SmartFox works, my web services are broken, but not completely. For example, I
have a login dialog that exists throughout the main timeline. When not in use,
it?s invisible.

Early in the timeline (during the splash screen for example), hitting the
login button brings the dialog forward and completing the userID and password
field then hitting OK calls a web service (code below). Everything works.

At the end of the main timeline my game clips get loaded and the main timeline
stops while they run and control user interaction. A button in the game can
unhide and execute the login dialog but this time it doesn?t work. The function
in the main timeline that the OK button calls still fires. The remoting code
gets called but no net traffic is sent or received.  Nothing...

I've tried every combination of _root., _level0, this, _global and more to
correctly/directly reference the Service, methods and event handlers. I've also
made the entire web services package a class - same result - the dialog works
early but not late in the timeline.

I know this is a scoping issue but I've checked all objects involved and they
are still valid when the login dialog is called during the game. Here's a
simple sample of the code that the login OK button calls (via
_root.login('jsmith', 'magicword');

function login(uid,pwd)
{
trace("Login service called:" + uid + "/" + pwd + "/" + myWebService.name);
var login_pc:PendingCall = myWebService.login(uid, pwd);
login_pc.responder = new RelayResponder(_root,"login_Result", "login_Fault");
trace("Login service completed.");
}

The myWebService object is valid when called (or so I think since it will
trace output its name property). Everything is as it was earlier in the splash
screen but now it doesn?t work. All help appreciated. I hate to go back to AS1
(but there it all works).

 
jag57 - 16 Jun 2006 14:52 GMT
Can you show me your login_Result and login_Fault functions?

Also, have you tried using the NetConnection Debugger yet?
 
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.