2010-11-16 79 views
0

我正在嘗試使用FileReference對象在我的Web應用程序中下載mp3文件。它在閃存環境中工作正常,但不適用於瀏覽器環境。可能是什麼問題呢。任何幫助將不勝感激。提前致謝。Flash文件下載在瀏覽器中不起作用

+0

訂閱的ErrorEvent和securityevent與您的FileReference並張貼在這裏的結果 – 2010-11-16 11:24:57

回答

1

這很可能是一個安全錯誤。你可以做的兩件事是監聽安全錯誤事件,然後安裝Flash播放器的調試版本。任何一方都會給你足夠的信息來識別問題。

1

我猜你在項目中使用(至少)FlashPlayer 9。請確保您的嵌入標籤中的目標是相同的版本。

也可以檢測安全錯誤。

file = new FileReference(); 
file.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); 
file.download("/images/imageOnServer.jpg"); 


function securityErrorHandler(event:SecurityErrorEvent):void 
{ 
    trace("securityErrorHandler: " + event); 
} 

More info on livedocs

相關問題