0
我收到以下消息時,我開始一個文本框裏面寫的東西:怪異的沙箱衝突
*** Security Sandbox Violation ***
SecurityDomain 'http :// localhost/crossdomain.xml' tried to access incompatible context 'file:///C|/.../Login.swf'
我沒有看到該消息的原因,但似乎這消息被拋出當我這樣做的關鍵.isDown(我有一個AS2 SWF,我加載在我的AS3 SWF中 - 我用它來檢測鼠標中點擊)。
crossdomain.xml以前用Security.loadPolicy加載,沒有問題。
任何想法?
在Key.idDown方法(在每個ENTER_FRAME事件中調用該方法)內引發錯誤。這是用來檢測鼠標中間和右邊點擊代碼:
import flash.system.Security;
Security.allowInsecureDomain("*");
Security.allowDomain("*");
var mouseButtons:Function = ASnative(800, 2);
onEnterFrame = function() {
_root._width = 0;
_root._height = 0;
if (mouseButtons(2)) {
_root._width = 2;
}
if (mouseButtons(4)) {
_root._height = 2;
}
};
你能分享一些代碼來說明問題?我覺得一個文本字段會導致安全沙箱錯誤,這似乎很奇怪。 – JeffryHouser 2010-08-19 19:20:36
在Key.idDown方法(在每個ENTER_FRAME事件中調用該方法)內引發錯誤。 這是用於檢測鼠標中間和右鍵單擊的代碼: import flash.system.Security; Security.allowInsecureDomain(「*」); Security.allowDomain(「*」); var mouseButtons:Function = ASnative(800,2); onEnterFrame = function(){\t \t _root._width = 0; \t _root._height = 0; \t \t 如果(mouseButtons(2)) \t { \t \t _root._width = 2; \t} \t \t 如果(mouseButtons(4)) \t { \t \t _root._height = 2; \t} }; – 2010-08-19 22:12:09
您能否請您發佈您的跨域策略文件? – 2011-04-10 14:30:25