Я выполняю следующую команду:
var chatRequest:URLRequest = new URLRequest("http://test.com/videophonetest/scripts/get_put_peerID.php?peerID=" + myID);
chatLoader = new URLLoader(chatRequest);
configureListenersChatLoader(chatLoader);
chatLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
chatLoader.load(chatRequest);
configureListenersChatLoader(chatLoader)
а друзья выглядят так:
private function configureListenersDeleteLoader(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(Event.COMPLETE, completeHandlerDeleteLoader);
dispatcher.addEventListener(Event.OPEN, openHandler);
dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
private function completeHandlerChatLoader(event:Event):void {
writeText("Completed Connection!");
var urlVariables:URLVariables = new URLVariables(chatLoader.data);
writeText("Your ID: " + myID);
theirID = urlVariables.peerID;
writeText("Their ID: " + theirID);
}
private function completeHandlerDeleteLoader(event:Event):void {
writeText("Deletion Complete!");
var urlVariables:URLVariables = new URLVariables(deleteLoader.data);
writeText("Deleted: " + urlVariables.deleted);
writeText("Getting New Chat...");
initNewChatSession();
}
private function openHandler(event:Event):void {
writeText("openHandler: " + event);
}
private function progressHandler(event:ProgressEvent):void {
writeText("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
}
private function securityErrorHandler(event:SecurityErrorEvent):void {
writeText("securityErrorHandler: " + event);
}
private function httpStatusHandler(event:HTTPStatusEvent):void {
writeText("httpStatusHandler: " + event);
}
private function ioErrorHandler(event:IOErrorEvent):void {
writeText("ioErrorHandler: " + event);
}
Команда работает на моем компьютере, но когда я пробую ее на компьютере соседа, она возвращает ошибку:
httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=0 responseURL=null]
securityErrorHandler: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"]
Есть причина, по которой это может происходить? Это работает на некоторых компьютерах, но не на других. Межсетевые экраны?