我正在使用 RemoteObjects 从 Flex/Flash Builder 4.6 调用 ZendAMF PHP。我想在基于事件或类似事件将请求发送到服务器之前停止或中止方法调用。
我有一个类,我在其中创建和存储所有 RemoteObjects - 例如:
activityLogService = new RemoteObject("zend");
activityLogService.endpoint=endpointServer;
activityLogService.addEventListener(FaultEvent.FAULT,faultHandler);
然后稍后我可以简单地调用这个对象:
remotingService.activityLogService .getRecords();
我试图在我的 remotingService 对象中找到一种方法来停止请求 - 并且不向服务器发送任何内容 - 例如,如果某些变量设置不正确。
我注意到有一个调用事件:activityLogService.addEventListener(InvokeEvent.INVOKE,invokeHandler);
但是,我不知道这是否会在适当的时候停止事情,或者是否有可能实际停止请求 - 如果是这样,如何?
谢谢!