LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-06-2004, 06:49 PM
RavenLike RavenLike is offline
Registered User
 
Join Date: Oct 2004
Location: Utah
Posts: 3
Rep Power: 0
RavenLike is on a distinguished road
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 });
	}
	
	


}
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

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




All times are GMT. The time now is 05:10 PM.