# \[F8 & Remoting\] Simple Question dealing with remoting

**URL:** <https://forum.kirupa.com/t/f8-remoting-simple-question-dealing-with-remoting/200289>\
**Category:** flash\
**Created:** [September 11, 2006, 6:37am UTC](https://forum.kirupa.com/t/f8-remoting-simple-question-dealing-with-remoting/200289 "2006-09-11T06:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flaevo](https://avatars.discourse-cdn.com/v4/letter/f/bbce88/32.png) [@Flaevo](https://forum.kirupa.com/u/Flaevo)\
**Post date:** [September 11, 2006, 6:37am UTC](https://forum.kirupa.com/t/f8-remoting-simple-question-dealing-with-remoting/200289/1 "2006-09-11T06:37:55Z")

</div>

Ok I’ll post my code and explain, this is using flash remoting and amfphp

main.fla / main.swf

```auto
// ==============================
// SETUP
// ==============================
var rootId:Number = 0;
var itemArrayCall:itemsClass = new itemsClass();
trace (itemArrayCall.getItemsList(rootId));
stop();

```

itemsClass.as

```auto
// ==============================
// IMPORTS
// ==============================
import mx.remoting.*;
import mx.rpc.*;
import mx.utils.Delegate;
import mx.remoting.debug.NetDebug;
// ==============================
// CLASS CONSTRUCTOR
// ==============================
class itemsClass {
	// Gateway
	private var gatewayUrl:String = "http://xfuzion.local/%7Exfuzion/finalproject/flashservices/amfphp/gateway.php";
	// Service
	private var service:Service;
	// == SETUP FUNCTION
	function itemsClass() {
		NetDebug.initialize();
		this.service = new Service(this.gatewayUrl, null, "itemsClass");
	}
	// == getItemsList FUNCTION
	function getItemsList(rootId) {
		var pc:PendingCall = service.getItemsList(rootId);
		pc.responder = new RelayResponder(this, "handleGetItemsList", "handleRemotingError");
		return "It will return these values but will not initialize the net debugger AT all or anything";
	}
	// == RESULT HANDLER FUNCTION
	function handleGetItemsList(re:ResultEvent) {
		return "it worked";
	}
	// == ERROR HANDLER FUNCTION
	function handleRemotingError(fault:FaultEvent):Void {
		NetDebug.trace({level:"None", message:"Error: "+fault.fault.faultstring});
	}
}

```

My problem is the fact the class works, everything works inside of it EXCEPT the remoting. It wont even initialize or run the NetDebug and it’s bugging me because I have no way to debug this because of it.

Any help on why it isn’t transfering or whatever would be very useful.

I get NO output errors at all, so all the MX components are on the stage correctly and amfphp is set up perfectly fine ( this whole thing works fine if I use it inline rather than class ).

Thanks!
