开发者

Flash file download not working in browser

I am trying to download mp3 file in my web application using FileReference object. It works fine in flash 开发者_如何学运维environment but does not work inside the browser environment. What could be the problem. Any help will be greatly appreciated. Thanks in advance.


this is most likely a security error. Two things you can do are listen for security error events and secondly install the debug version of Flash player. Either one will give you enough info to identify the issue.


I guess you are using (at least) FlashPlayer 9 in your project. Please ensure you are targeting the same version in your embed-tag.

It is also possible to detect security errors.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜