2011-12-09 42 views
1

我的Flex應用程序生成sanbox錯誤SecurityError:錯誤#2060:違反安全sanbox:ExternalInterface file:/// C:/ Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus。 swf無法訪問file:/// C:/ Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus.html。外部接口上的柔性沙箱錯誤

1)這作品時,我發佈在網絡上,當我打開HTML文件作爲文件不起作用://

2) params.allowscriptaccess = 「總是」;

3)我採用c測試:\ flashProspectus.html(以避免在我的撓曲初始化在文件路徑空間)

4),我添加:的Security.allowDomain( '*' );

5)在我的Flex初始化

的Security.allowDomain( '*');

ExternalInterface.addCallback(「setPage」,setPage); //這行代碼產生的問題:如果我刪除它,一切工作正常

我想我真的做了我所能做的一切:那是怎麼回事?

+1

這可以幫助你嗎? http://stackoverflow.com/questions/4698506/actionscripts-externalinterface-addcallback-only-working-locally-not-in-produc – AsTheWormTurns

回答

2

您可能正在從不受信任的本地目錄運行SWF文件。

將目錄「C:\ Documents and Settings \ test \ Bureau \ FPtest \ 4.5」(或其父母之一)添加到本地受信任的目錄列表中。

當前設置的配置不同,具體取決於您使用的Flash Player版本和瀏覽器。舊的Flash Player設置管理器仍然應該可以工作:http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

只需將您計劃運行Flash內容的目錄添加到受信任的位置列表。

還有一個類似的問題在這裏:http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html