什么会导致 SecurityErrorEvent?
我正在执行以下命令:
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"]
任何原因可能是发生?它适用于某些计算机,但不适用于其他计算机。防火墙?
I'm executing the following command:
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)
and friends looks like:
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);
}
The command works on my computer but when I try it on my roommates computer it returns an error:
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"]
Any reason why this might be happening? It works on some computers but not others. Firewalls?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在此设置管理器中允许该文件在您朋友计算机上的位置:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
You will need to allow the location of the file on your friends' computer in this settings manager:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html