aliencity
aliencity

Reputation: 83

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.

Upvotes: 0

Views: 932

Answers (2)

Mark Knol
Mark Knol

Reputation: 10163

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

Upvotes: 1

Tyler Egeto
Tyler Egeto

Reputation: 5495

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.

Upvotes: 1

Related Questions