2010-04-06 90 views
0

我有swf加載swf,加載另一個swf(視頻播放器)。Flash ActionScript 3運行時SecurityError

發佈設置有一個技巧嗎?一切正常我的本地機器上,當我上傳它的服務器錯誤發生,視頻犯規負載

SecurityError: Error #2148: SWF file http:// (URL where Site is hosted)/video.swf cannot access local resource file:///Macintosh%20HD/Users/..flash.flv. Only local-with-filesystem and trusted local SWF files may access local resources. at flash.net::NetStream/play() at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_play() at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream() at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_load() at fl.video::VideoPlayer/load() at fl.video::FLVPlayback/doContentPathConnect()

+2

這肯定不是完整的錯誤,是嗎? – quoo 2010-04-06 15:33:30

+0

不,我不確定是否相關,但現在是這樣。 – 2010-04-06 15:41:54

+1

當您試圖訪問flv/video播放器或保存swf的swf(swf由主swf載入,其中包含視頻播放器)時,是否引發錯誤? Eitherway,這裏有一個快速清單,以防您從另一個域訪問內容,可能會有所幫助: 1.您有一個crossdomain.xml設置 2.如果您使用的是flash ide, '在發佈設置中的Flash選項卡下的本地播放安全性。 3.如果您已經完成上述設置,請檢查您的加載程序是否有一個LoaderContext對象,並將checkPolicyFile設置爲true。 HTH – 2010-04-06 15:43:51

回答

0

以下幾件事情。記住您的安全策略文檔和您的SWF發佈設置。我希望這些資源有所幫助。

跨域策略 「使用主單獨」

<?xml version="1.0"?> 
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> 
<cross-domain-policy> 
    <site-control permitted-cross-domain-policies="master-only"/> 
    <allow-access-from domain="*" to-ports="*"/> 
</cross-domain-policy> 

你的SWF發佈設置
alt text http://ashcraftband.com/myspace/videodnd/network.jpg

參考
http://www.adobe.com/devnet/flashplayer/articles/fplayer9-10_security.html
http://jodieorourke.com/view.php?id=108&blog=news