
Welcome Guest
|
#1
|
|||
|
|||
|
Flash Remoting Scope Issue -Resolved
In frame 1 of a movie I am creating a new AMFPHP connection.
If I place a RelayResponder in the root I get the proper results. When I place the RelayResponder and the rest of the code in a OnPress event for a button it fails to call the RelayResonder. I know it has something to do with the Constructor for new RelayResponder. If I pass "this" to the constructor in the frame it works. If I pass PC or This to the frame in the OnPress it fails. I am not sure how to get around this. Thanks for any Help Actionscript:
THIS WORKS
var mikeService:Service = new Service("http://localhost/amf/hello/gateway.php",new Log(Log.DEBUG, "custlog"),"HelloWorld",null,null);
mx.remoting.debug.NetDebug.initialize();
var pc:PendingCall = mikeService.makeEcho("HelloWorld");
pc.responder = new RelayResponder(this,"gr","br");
function gr (re:ResultEvent){
_root.show.text = re.result;
}
function br (fault:FaultEvent){
mx.remoting.debug.NetDebug.trace({level:"None",
message:"There was a problem: " + fault.fault.faultstring });
}
THIS FAILS
callButton.onPress = function(){
var mikeService:Service = new Service("http://localhost/amf/hello/gateway.php",new Log(Log.DEBUG, "custlog"),"HelloWorld",null,null);
mx.remoting.debug.NetDebug.initialize();
var pc:PendingCall = mikeService.makeEcho("HelloWorld");
pc.responder = new RelayResponder(pc,"gr","br");
function gr (re:ResultEvent){
_root.show.text = re.result;
}
function br (fault:FaultEvent){
mx.remoting.debug.NetDebug.trace({level:"None",
message:"There was a problem: " + fault.fault.faultstring });
}
} |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Flash Builder 4.6 is now available for download | FlashMove | Flash Builder |
0 | 12-05-2011 01:35 AM |
| The News From Adobe on the Future of Flash Platform | FlashMove | Chit Chat Lobby | 0 | 11-10-2011 09:55 AM |
| Flash Remoting Storefront for Sale | level4designs | New Softwares | 0 | 08-18-2006 09:16 PM |
| php and flash issue. | Arthur005 | Flash MX 2004 |
4 | 10-20-2005 05:26 AM |
| flash remoting | ejastegall | Flash Media Server |
3 | 02-27-2004 11:40 PM |

Programming Languages



