什么会导致 SecurityErrorEvent?

发布于 2024-11-04 20:10:04 字数 3063 浏览 1 评论 0原文

我正在执行以下命令:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪我闹别瞎闹 2024-11-11 20:10:05

您需要在此设置管理器中允许该文件在您朋友计算机上的位置:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文