javascriptflashapache-flexactionscriptnavigatetourl

Event when navigateToURL has finished in flex


I am using navigateToURL for file downloading from server. Is there anyway possible to know when navigateToURL has finished, more like when browser download dialog has opened?

Sometimes it takes 5 seconds to complete, user might get confused and start clicking download button like psychopath, which can result in multiple download dialogs opened.

I want to add some "please wait" text or something before it finishes (I already have one, I just need to know when to stop).
Maybe it can be done using javascript and get info from ExternalInterface?


Solution

  • Is there anyway possible to know when navigateToURL has finished, more like when browser download dialog has opened?

    No, there is not. Once you pass a request onto the browser; the Flash Player no longer has any control or access to it.

    You mention using ExternalInterface as part of a possible solution, but how would your HTML/JavaScript page know that a download had been finished?